LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 07-23-2007, 04:36 PM   #1
littlewenwen
Member
 
Registered: Mar 2007
Posts: 32

Rep: Reputation: 15
install/uninstall in linux


Dear All,

I am using Suse 10.0. I just found the JAVA version (1.4.2) on my computer out of date, and I want to install the latest version (1.6). I have several questions:


1. How to remove program in Linux?
In this case, how to remove JAVA 1.4.2 ( I couldn't find the directory where it is).


2. Do I have to remove JAVA 1.4.2 completely before installing JAVA 1.6?



3. When installing a new program (like to install JAVA 1.6 in this case) in Linux, how to make it accseeible to EVERY user? and how to make it accessible ONLY to the current user who install it?


4. How to set the PATH for
a: a program that is accessible to EVERY user?
b: a program that is only accessible to the current user who install it?



Please excuse my ignorance. I've used Windows too long, and the above problems really confuse me. Thanks a lot in advance!
 
Old 07-23-2007, 04:45 PM   #2
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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.
 
Old 07-23-2007, 06:38 PM   #3
littlewenwen
Member
 
Registered: Mar 2007
Posts: 32

Original Poster
Rep: Reputation: 15
Thank you very much for your reply.

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?
 
Old 07-23-2007, 07:04 PM   #4
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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*
./jre*rpm.bin
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:
export j2re_home=/path/to/jre
instead of what I said before - I assumed you would be installing jdk, not jre.

Last edited by jay73; 07-23-2007 at 07:05 PM.
 
Old 07-23-2007, 08:20 PM   #5
littlewenwen
Member
 
Registered: Mar 2007
Posts: 32

Original Poster
Rep: Reputation: 15
Thank you.

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?
 
Old 07-23-2007, 08:23 PM   #6
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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:
echo $J2RE_home
It should return the path to jre.
 
Old 07-23-2007, 11:02 PM   #7
littlewenwen
Member
 
Registered: Mar 2007
Posts: 32

Original Poster
Rep: Reputation: 15
Thank you.

I added the line "export J2RE=/usr/java/jre1.6.0_02" to the bottom of "profile", after that, i ran the command " source /etc/profile ".

Then I ran the command "echo $J2RE_home", however, it returns nothing.

I reboot the computer. And I checked the installation from Sun's website again, unfortunately, it still says I am using the old version ( "java-1_4_2-sun" ).

What I did wrong?
 
Old 07-23-2007, 11:32 PM   #8
littlewenwen
Member
 
Registered: Mar 2007
Posts: 32

Original Poster
Rep: Reputation: 15
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?
 
Old 07-24-2007, 01:03 AM   #9
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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 02:27 PM. Reason: language cleanup ... post had been reported.
 
Old 07-24-2007, 01:36 AM   #10
littlewenwen
Member
 
Registered: Mar 2007
Posts: 32

Original Poster
Rep: Reputation: 15
thank you.

Unfortunately, after i tried all the suggestions, i still got the same bad result as before. what i am wondering is why it shows as "jre" in YAST instead of "JAVA-1.6"?

thank you for your time. just forget about this issue.
 
Old 07-24-2007, 02:43 AM   #11
jay73
LQ Guru
 
Registered: Nov 2006
Location: Belgium
Distribution: Ubuntu 11.04, Debian testing
Posts: 5,019

Rep: Reputation: 130Reputation: 130
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.
 
Old 07-24-2007, 10:59 AM   #12
littlewenwen
Member
 
Registered: Mar 2007
Posts: 32

Original Poster
Rep: Reputation: 15
thank you. But I couldn't find jre1.5 in YAST.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to uninstall windows and install linux the BAd Linux - Software 13 11-30-2009 03:59 PM
can't uninstall win 2000 & xp or install linux dctjr Linux - General 10 07-15-2007 11:04 PM
uninstall linux/install win xp ayaman Linux - Newbie 8 09-11-2004 02:34 PM
Install/Uninstall PhuckFonix Linux - Newbie 6 03-27-2004 01:51 PM
RH 8.0 Install/Uninstall mawarsha Linux - Newbie 1 02-04-2003 04:09 AM


All times are GMT -5. The time now is 11:05 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration