setting java classpath...
I'm using red-hat 9.0 on a laptop.2 things:
How do I set the Java classpath variable in linux? Where do I need to set it to? I've downloaded the latest jdk (j2sdk-1_4_2_01-linux-i586-rpm) and executed the file but I don't know where it has put the required java files. I really don't have a clue when it comes to linux I'm afraid! Thanks for any help |
Look in your /usr/java/ directory. You should see a directory called j2sdk1.4.2 or something similar.
I'm not sure what you mean by setting the classpath. You would usually want to set that when you run a java app. Java will automatically load the runtime jars for when it's started. On the off chance your asking about adding the java binary to your path, you have two choices. 1. Add $PATH=$PATH:/<fullpathtojdk>/bin to your /etc/profile if you want java available to all users. 2. Add $PATH=$PATH:/<fullpathtojdk>/bin to your $HOME/.bashrc if you only want java available to you. Mike |
I don't have a /usr/java directory - perhaps it hasn't been set up properly on my computer
|
How did you install the rpm?
To install rpms you have to run, as root, rpm -Uvh <name_of_rpm>. In your case this would be rpm -Uvh j2sdk-1_4_2_01-linux-i586-rpm. If I remember correctly Sun distributes a .bin file that you have to run and agree to the license. This will extract the rpm. You then have to install the rpm using the above instructions. Mike |
I have run the .bin file and agreed to the license. I don't know where it extracts the rpm to though. Any ideas? It isn't the same directory
|
That's odd :( It extracted to the same directory when I ran it. Did you notice any error messages right after agreeing to license? It's possible that the file was corrupted during the download.
Might want to download it again. |
yeah it is corrupted - just realised. Oh well download it again which is fun with my 56k modem. Thanks for your help
|
Quote:
Mike |
All times are GMT -5. The time now is 12:53 AM. |