Extract strings from Java classes

I want to extract all the lines (texts written in "") in hundreds of Java classes in order to pass them to a translator for translation of a multilingual platform.

Does anyone have any ideas how I can do this? Any special freeware or method?

+6
java string extract
source share
4 answers

Eclipse has an External Rows function that creates a properties file for all rows in a class or classes. Other IDEs may have a similar function.

+5
source share

If you use eclipse as your IDE, it is as simple as selecting your project and from the context menu select "Source / Externalise Strings".

+4
source share

You can write a program to use regular expressions to capture any groups enclosed in strings.

+1
source share

If you have the source code, use the Eclipse function to externalize the lines mentioned by Dave.

If you only have class files, use the GNU string tool, which will find any string sequences inside the binary.

http://sourceware.org/binutils/docs/binutils/strings.html

0
source share

All Articles