howto find specific java source file responsible for output string from many possibilities
I have been experimenting with someone else's java program, which is spread over many directories, and .java so开发者_开发知识库urce files. When I run the program on the command line (Linux), it works perfectly but there is an output string that I would like to get rid of.
The output is a single integer value that changes, with nothing constant that I could use grep
to search for.
The problem is that I don't know which of the source files is responsible for this output. Can someone recommend a strategy for determining where this piece of code is?
Use an IDE. I prefer IntelliJ, which has a community edition which is free. People like Eclipse and Netbeans. Really any will do.
IDEs make life a lot simpler. You can control click into methods and what-not, debug easily, refactor easily, etc.
If you like pain and want to use the CL, you are for the most part reduced to grepping the .java files and looking for the output. that will work if the output is a constant, but won't really work if the value is the result of a computation....
精彩评论