Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.