3

Is there any tool like Linux's strings command for java? I want to see only strings not all printable things.

3
  • 1
    I'd argue that a Unicode String could contain all printable things. What are you looking for specifically? Non-printable characters? (How would you be able to print those?) Commented Nov 19, 2012 at 7:00
  • Do you mean, is there a version/equivalent of Linux/Unix strings command, which can display strings from compiled Java class files? If so, please clarify the question a bit. Commented Nov 19, 2012 at 7:24
  • @hyde I want to display strings in .class files. Commented Nov 19, 2012 at 8:19

2 Answers 2

2

For Windows:

Answered here: https://stackoverflow.com/a/10645087/1717300

Quote from that:

Someone already wrote a utility that does what you want:

http://technet.microsoft.com/en-us/sysinternals/bb897439.aspx

Did not readily find a straight out Linux tool for this, but that Question is about doing this in Python, and there's an answer for writing Python tool for the purpose, as well as bunch of linked questions.

Sign up to request clarification or add additional context in comments.

Comments

2

strings is a lifesaver. But String.replaceAll() always worked with me,

keep only alphabet characters

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.