benjaminzsj Posted September 21, 2007 Share Posted September 21, 2007 Hi, I have a folder of .java files, I put the path to it into .bashrc, like $CLASSPATH=... export CLASSPATH, but it doesn't work, and I also tried that with .jar file, no luck either, how do I do this in Linux? The error was "package does not exist". Link to comment Share on other sites More sharing options...
night_stalker_z Posted September 21, 2007 Share Posted September 21, 2007 You probably need to compile the .java files unless thats what your trying to do. Link to comment Share on other sites More sharing options...
benjaminzsj Posted September 21, 2007 Author Share Posted September 21, 2007 Yeah, I compiled them. How about jar? Link to comment Share on other sites More sharing options...
benjaminzsj Posted September 21, 2007 Author Share Posted September 21, 2007 javac --classpath /path/to/my/package/my.jar my.java This doesn't work either. Link to comment Share on other sites More sharing options...
night_stalker_z Posted September 21, 2007 Share Posted September 21, 2007 Yeah, I compiled them. How about jar? Are you trying to get the classpath to find the jar files before or after you compile them? Link to comment Share on other sites More sharing options...
night_stalker_z Posted September 21, 2007 Share Posted September 21, 2007 https://java.sun.com/j2se/1.4.2/docs/tooldo...dows/javac.html https://java.sun.com/j2se/1.4.2/docs/tooldo.../classpath.html These 2 links should help. 2nd one is for classpath. Link to comment Share on other sites More sharing options...
benjaminzsj Posted September 22, 2007 Author Share Posted September 22, 2007 Thanks, problem solved, seems that I didn't configure Java right. I tried a command "update-java-alternatives" and it's working now. Link to comment Share on other sites More sharing options...
Recommended Posts