LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 09-14-2011, 05:11 AM   #1
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Rep: Reputation: 33
A question about installing JDK/Java with yum


Hi,

As I list the available JDK with yum I got followings:
Code:
...
java-1.6.0-sun.i586      1:1.6.0.24-1jpp.1.el5
java-1.6.0-sun.x86_64    1:1.6.0.24-1jpp.1.el5
java-1.6.0-sun-devel.i586
java-1.6.0-sun-devel.x86_64
java-1.4.2-bea.i686      1.4.2.16-1jpp.2.el5
java-1.4.2-bea-demo.i686 1.4.2.16-1jpp.2.el5
java-1.4.2-bea-devel.i686
java-1.4.2-bea-jdbc.i686 1.4.2.16-1jpp.2.el5
java-1.4.2-bea-missioncontrol.i686
java-1.4.2-bea-src.i686  1.4.2.16-1jpp.2.el5
java-1.4.2-bea-uninstall.i686
java-1.4.2-gcj-compat.x86_64
java-1.4.2-gcj-compat-devel.i386
java-1.4.2-gcj-compat-devel.x86_64
java-1.4.2-gcj-compat-javadoc.x86_64
java-1.4.2-gcj-compat-src.x86_64
java-1.4.2-ibm.i386      1.4.2.13.9-1jpp.1.el5
java-1.4.2-ibm.x86_64    1.4.2.13.9-1jpp.1.el5
java-1.4.2-ibm-demo.i386 1.4.2.13.9-1jpp.1.el5
java-1.4.2-ibm-demo.x86_64
java-1.4.2-ibm-devel.i386
java-1.4.2-ibm-devel.x86_64
java-1.4.2-ibm-javacomm.i386
java-1.4.2-ibm-javacomm.x86_64
java-1.4.2-ibm-jdbc.i386 1.4.2.13.9-1jpp.1.el5
java-1.4.2-ibm-plugin.i386
java-1.4.2-ibm-src.i386  1.4.2.13.9-1jpp.1.el5
java-1.4.2-ibm-src.x86_64
java-1.5.0-bea.x86_64    1.5.0.14-1jpp.2.el5
java-1.5.0-bea-demo.x86_64
java-1.5.0-bea-devel.x86_64
java-1.5.0-bea-jdbc.x86_64
java-1.5.0-bea-mercuryprofiler.x86_64
java-1.5.0-bea-missioncontrol.x86_64
java-1.5.0-bea-src.x86_64
java-1.5.0-bea-uninstall.x86_64
java-1.5.0-ibm.i386      1:1.5.0.12.4-1jpp.1.el5
java-1.5.0-ibm.x86_64    1:1.5.0.12.4-1jpp.1.el5
java-1.5.0-ibm-accessibility.x86_64
java-1.5.0-ibm-alsa.i386 1:1.5.0.3-1jpp.4.el5
java-1.5.0-ibm-demo.i386 1:1.5.0.12.4-1jpp.1.el5
java-1.5.0-ibm-demo.x86_64
java-1.5.0-ibm-devel.i386
java-1.5.0-ibm-devel.x86_64
java-1.5.0-ibm-javacomm.i386
java-1.5.0-ibm-javacomm.x86_64
java-1.5.0-ibm-jdbc.i386 1:1.5.0.12.4-1jpp.1.el5
java-1.5.0-ibm-plugin.i386
java-1.5.0-ibm-src.i386  1:1.5.0.12.4-1jpp.1.el5
java-1.5.0-ibm-src.x86_64
java-1.5.0-sun.x86_64    1.5.0.22-1jpp.1.el5
java-1.5.0-sun-demo.x86_64
java-1.5.0-sun-devel.x86_64
java-1.5.0-sun-jdbc.x86_64
java-1.5.0-sun-plugin.i586
java-1.5.0-sun-src.x86_64
java-1.5.0-sun-uninstall.x86_64
java-1.6.0-bea.x86_64    1:1.6.0.03-1jpp.2.el5
java-1.6.0-bea-demo.x86_64
java-1.6.0-bea-devel.x86_64
java-1.6.0-bea-jdbc.x86_64
java-1.6.0-bea-missioncontrol.x86_64
java-1.6.0-bea-src.x86_64
java-1.6.0-bea-uninstall.x86_64
java-1.6.0-ibm.i386      1:1.6.0.9.2-1jpp.2.el5
java-1.6.0-ibm.x86_64    1:1.6.0.9.2-1jpp.2.el5
java-1.6.0-ibm-accessibility.x86_64
java-1.6.0-ibm-demo.i386 1:1.6.0.9.2-1jpp.2.el5
java-1.6.0-ibm-demo.x86_64
java-1.6.0-ibm-devel.i386
java-1.6.0-ibm-devel.x86_64
java-1.6.0-ibm-javacomm.i386
java-1.6.0-ibm-javacomm.x86_64
java-1.6.0-ibm-jdbc.i386 1:1.6.0.9.2-1jpp.2.el5
java-1.6.0-ibm-jdbc.x86_64
java-1.6.0-ibm-plugin.i386
java-1.6.0-ibm-plugin.x86_64
java-1.6.0-ibm-src.i386  1:1.6.0.9.2-1jpp.2.el5
java-1.6.0-ibm-src.x86_64
java-1.6.0-openjdk.x86_64
java-1.6.0-openjdk-demo.x86_64
java-1.6.0-openjdk-devel.x86_64
java-1.6.0-openjdk-javadoc.x86_64
java-1.6.0-openjdk-src.x86_64
java-1.6.0-sun.i586      1:1.6.0.26-1jpp.1.el5
java-1.6.0-sun.x86_64    1:1.6.0.26-1jpp.1.el5
java-1.6.0-sun-demo.i586 1:1.6.0.26-1jpp.1.el5
java-1.6.0-sun-demo.x86_64
java-1.6.0-sun-devel.i586
java-1.6.0-sun-devel.x86_64
java-1.6.0-sun-jdbc.i586 1:1.6.0.26-1jpp.1.el5
java-1.6.0-sun-jdbc.x86_64
java-1.6.0-sun-plugin.i586
java-1.6.0-sun-plugin.x86_64
java-1.6.0-sun-src.i586  1:1.6.0.26-1jpp.1.el5
java-1.6.0-sun-src.x86_64
...
My questions:
1.
Can I install all these?

If yes, how can I find out where are these (under which dir) installed?

2.
How can I set the JAVA_HOME?

3.
I can also install the Java manually such like download the zip und unpack it. What's the ad and disadvantage using yum or not?



Thomas

Last edited by thomas2004ch; 09-14-2011 at 05:15 AM.
 
Old 09-14-2011, 05:15 AM   #2
ButterflyMelissa
Senior Member
 
Registered: Nov 2007
Location: Somewhere on my hard drive...
Distribution: Manjaro
Posts: 2,766
Blog Entries: 23

Rep: Reputation: 411Reputation: 411Reputation: 411Reputation: 411Reputation: 411
Hi,

You'll only need the most recent one...so

Quote:
yum install java-1.6.0-sun.i586
...ought to do it.

Quote:
How can I set the JAVA_HOME?
in the console type:

Quote:
JAVA_HOME=/the/folder
And in the corresponcing rc, enter that line to persist it tru the next startup...

Luck

Thor
 
Old 09-14-2011, 06:12 AM   #3
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Original Poster
Rep: Reputation: 33
Quote:
Originally Posted by Thor_2.0 View Post
Hi,

You'll only need the most recent one...so
If I want several version of Java?


Quote:
in the console type:

And in the corresponcing rc, enter that line to persist it tru the next startup...
Yes. But before I set the JAVA_HOME, I have to know where the Java installed, right?
 
Old 09-14-2011, 07:11 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
No problem having 2 .. 4 versions. And don't set any "JAVA_HOME".

Use the "Redhat method" : The alternatives "version switcher".

1) su
2) /sbin/alternatives/ --config java


And if a new version has not been automatically added to /etc/alternatives,
a command like this will do :
/usr/sbin/alternatives --install /usr/bin/java java /usr/java/jre1.6.0/bin/java 20000
or /usr/sbin/alternatives --install /usr/bin/java java /usr/java/jdk1.6.0_26/bin/java 2
http://www.if-not-true-then-false.co...-red-hat-rhel/

The location etc. can be found with : ls /usr/java

.
 
Old 09-14-2011, 07:51 AM   #5
thomas2004ch
Member
 
Registered: Aug 2009
Posts: 539

Original Poster
Rep: Reputation: 33
Hi,

In our case we use different JDK versions at the same time by different user. That menas the version switcher is not suitable in this case.
 
Old 09-14-2011, 11:41 AM   #6
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,631

Rep: Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696Reputation: 2696
Different versions for different users

IN that case: you might -- set the JAVA_HOME on the users profile, .bash_profile, or .bashrc (or as appropriate depending upon their shell) and add ${JAVA_HOME}/bin to the PATH for that user (in the same file).
 
  


Reply



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
java jdk question pythonsyntax Linux - Software 2 05-20-2011 04:02 PM
A question about OS, JDK/Java version and Jboss thomas2004ch Linux - Software 3 08-11-2010 04:03 PM
Installing JDK 6 version 14 with yum rasaan Linux - Software 4 07-20-2009 10:55 AM
Help installing the Java JDK CS_Student_DrewU Programming 2 07-14-2007 10:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:34 PM.

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
Open Source Consulting | Domain Registration