Reputation: 3056
Is there an elegant way to parse Java sourcecode and to isolate its Strings?
I would like to do that to copy all Strings into an office file with which I can run German spell-checking.
Upvotes: 0
Views: 123
Reputation: 17784
You can use regular expressions, like in this question: shell: extract string from source code
But probably the better way would be to configure the spell checker of your IDE.
Upvotes: 0
Reputation: 1217
You can make a heap dump of your application via jvisualvm, it will save all present in memory String instances. The result will be stored in .hprof file, see How do I analyze a .hprof file?
Upvotes: 0
Reputation: 8246
You could use properties files
http://www.java-forums.org/blogs/java-basic/974-how-use-properties-file-java.html
Upvotes: 1