make a batch file and place it in the same directory of your program...
cd\
M: \\Replace it by the drive ur file is in ie C:
cd YourJavaFilePath
javac FileName.java
java FileName>results.txt
so all u need to do is open the text file and check the results...once u make a batch file u can copy paste it to make others...
example: this batch runs M:\JavaServerClientProgram\LocalScan.java and gives output in results.txt
cd\
M:
cd JavaServerClientProgram
javac LocalScan.java
java LocalScan>results.txt