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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
You go to System > Yast > Software management, locate the software title in question , remove it, select the newer one, install it, done. Or you can simply leave 1.4.2 installed, it takes up some space but that's all it does.
Setting the path involves /etc/profile; just add:
export JAVA_HOME=/path/to/java folder
and then do: source /etc/profile
To make it available to only one user, you would put this information in the bashrc folder in their home directory instead.
Allowing or denying access to others is essentially a matter of setting permissions on applications and/or folders.
1. I tried YAST. I downloaded JAVA 1.6 (jre-6u2-linux-i586-rpm.bin and jre-6u2-linux-i586.bin) and try to import them to YAST. But I failed. Do I have to un-compress them first?
2. Rather than use YAST, can you suggest me a "command line" based method for both installation and uninstallation? (including what is the correct directory I should install to if the programm is to be used by EVERY user?)
3. I used vi editor trying to modify the /etc/profile, but it (the "profile") is recommended that I shouldn't do so. Is there any other way to set the PATH?
1. Well, the whole point of yast is that you don't need to download or import anything. jdk6 should be there already, on the list of available software. All you need to do is select the item and click on "Apply". If you find there isn't any jdk6 (as there wasn't yet when I left Suse behind some months ago), you can still use your downloaded bin file. Or use jre5 from yast instead - that is just as good as jre6 for all purposes. If you do need jre6, place the rpm.bin in your home directory, then use the command line and do:
chmod +x jre*
rpm -ivh jre*rpm
2. see above; uninstalling can be done using rpm -e but using Yast and simply unselecting the item is a lot more convenient.
It doesn't matter where you install to, not in this case. Besides, the rpm -ivh will automaticaly install jre to either /opt or /usr/java.
3. Never mind what the /etc/profile says, just make sure you don't remove or overwrite anything. Btw, you need this:
instead of what I said before - I assumed you would be installing jdk, not jre.
I installed jre-6u2-linux-i586-rpm. It is in directory "/usr/java". And I can see it in YAST shown as "jre", (and the old version "java-1_4_2-sun" is still there)
I havn't write the PATH yet. I checked the installation from Sun's website and it still says that I am using the old version ( "java-1_4_2-sun" ) and ask me to install the new version. Is this because the PATH?
Yes. Just put export J2RE=/usr/java/jre... in /etc/profile (assuming that it is jre that is in /usr/java - I'm not sure because I use the jdk instead of jre, then source /etc/profile. You can check from the command line like this:
It should return the path to jre.
I guess sth is wrong during the installation: I forgot to mention that in YAST, there is a little marker (like a lock) beside "jre", when i put the mouse on "jre" a message shows "not available for installation", what does this mean? Do i have to uninstall java-1.4.2?
OK, one thing at a time. The reason you don't get any return from echo JRE_home is:
a/ I may have made a mistake: some distributions use "J2RE" while other ones use "JRE" - try replacing "J2RE" in /etc/profile with "JRE"; don't forget to source the file again after doing so.
b/You need to be root to see any return from that command
c/Sun's test isn't always 100% accurate; what is more reliable is opening up firefox and typing about: plugins in the address bar - it will show all plug-ins that are in use, including jre. Never mind the smiley - I didn't mean to use one, I guess it appears because I combined a colon with a p, which is equivalent to one of those happy smiley characters...duh!
d/Yast can be a pain; as you spend more time with Suse, you'll find more than once that it does some really freaky stuff.
Last edited by Tinkster; 07-24-2007 at 01:27 PM.
Reason: language cleanup ... post had been reported.
Because java can be two things: either jdk or jre. Jre is the part that serves to run applications and it is what most people need; jdk is for programmers and it can be used to write programs that will run on a jre. The jre is actually part of the jdk but since most people don't need all that programming stuff, Sun offers the jre as a separate package.
Have you tried installing jre1.5 or jre1.6 from yast yet? They are nearly identical - in fact, jre1.5 may have wider support because it is older.