I am not a java developer. I just want to run a java application (which can be downloaded from:
http://code.google.com/p/k-shortest-paths/downloads/list
, under this name: KShortestPaths_Java_v2.1.zip)
While trying to compile test\edu\asu\emit\qyan\test\YenTopKShortestPathsAlgTest.java
I get "package ... does not exist" and "symbol ... does not exist" which I know are related to path setting. Can you please tell me how I should set environment variables and from which directory compile and run that java file?
(My operating system is Windows XP and I have saved the application in C:\KSh)
Edit:
I resolved the problem with compiling. Now, I have a CLASS file: YenTopKShortestPathsAlgTest. However, when I try to run it with java, I get this error: "could not find the main class... program will exist"
which I guess is again related to the paths other jar files are located. Could you please kindly give me a hint?
解决方案
The zip file contains a .classpath and a .project file. These files are used by the eclipse java IDE.
Perhaps the most easy way would be to download eclipse and import the project there.
If you want to do it by hand, try
javac -sourcepath src;test test\edu\asu\emit\qyan\test\YenTopKShortestPathsAlgTest.java
from your directory C:\KSh.
EDIT:
Download junit.jar and add it to the classpath with
javac -classpath junit.jar -sourcepath....