October 21st, 2002, 12:12 PM
I downloaded the JDK and I cant get my java and javac to work. It keeps telling me 'command not found' even when I am in the bin directory. I am running RH Linux and tried setting the CLASSPATH in the sh shell by typing
CLASSPATH=the java home
Well I dont know whot else to do. HELP!!
October 21st, 2002, 12:20 PM
You need to set the PATH variable, not the CLASSPATH (although you will need the classpath set later). From within the bin directory, did you type "java", or "./java". Red Hat doesn't include the current directory in the path by default.
Also, you don't want to point the PATH or CLASSPATH to the root directory. The PATH needs to point to /bin, and the CLASSPATH needs to point to /lib.
October 21st, 2002, 12:29 PM
I did set the PATH, but it just doesnt stick.
When I restart the comp, it isnt there anymore
October 21st, 2002, 01:02 PM
Ok, I fixed the PATH to point to javahome/bin and the java commands are running by editing the $PATH in .bash_profile. Do I have to do CLASSPATH? How do i make i stick?
October 21st, 2002, 01:49 PM
Look at the syntax in your .bash_profile for how the path is set. You should be able to copy that basic format for your classpath.
The problem with persistence that you're having is that when you log out all your environment variables are erased. You need to put commands into a script (.bash_profile) that is run every time you login.
October 22nd, 2002, 11:21 AM
I pointed the the PATH to .bash_profile, I also set the CLASSPATH to bin. The commands are now working but I keep getting an error telling me that the package system does not exist.
October 22nd, 2002, 11:41 AM