Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion
User Name
LinuxAnswers Discussion This forum is to discuss articles posted to LinuxAnswers.


  Search this Thread
Old 10-19-2004, 11:55 PM   #1
LQ Newbie
Registered: Jun 2004
Location: USA
Distribution: Fedora Core 2
Posts: 15

Rep: Reputation: 0
Post DISCUSSION: HOWTO: Install Sun's Java VM in Fedora Core 2

This thread is to discuss the article titled: HOWTO: Install Sun's Java VM in Fedora Core 2
Old 10-20-2004, 03:23 AM   #2
Senior Member
Registered: Nov 2002
Location: Birmingham UK
Distribution: Various
Posts: 1,736

Rep: Reputation: 146Reputation: 146
seems like a long winded way of achieving things
i just went to dag.wiers site and downloaded the j2re rpm and the mozilla-j2re rpm and that was that
Old 11-29-2004, 02:30 AM   #3
Registered: Mar 2004
Distribution: CentOS
Posts: 174

Rep: Reputation: 30
do NOT remove the java javac and jar files in /usr/bin

That is poor advice - and the symlinks you create will be destroyed in an rpm update to the packages that own them.

Instead, set your JAVA_HOME environmental variable and set $JAVA_HOME/bin at the beginning of your path.

Let's say for you example you installed blackdown j2re in /opt/blackdown/j2re-1.4.2-01

You would create a file called in /etc/profile.d/ containing the following:

export JAVA_HOME=/opt/blackdown/j2re-1.4.2-01
if [ `echo $PATH |grep -c "$JAVA_HOME"` -eq 0 ]; then
        export PATH=$JAVA_HOME/bin:$PATH
and make it executable ( chmod +x /etc/profile.d/ )

Watch what this does -

[buildmaster@devel ~]$ which java
[buildmaster@devel ~]$ echo $PATH
[buildmaster@devel ~]$
I did not have to remove any binaries or make any symlinks, when I log in - /etc/profile.d/ gets executed, putting /opt/blackdown/j2re-1.4.2-01/bin at the front of my path resultint in binaries contained within being at the front of my path.

In the case of the sun rpm mentioned in the article, it puts the java install in /usr/java/j2re1.4.1_01/ so you would change the JAVA_HOME in the above script to point to there.
Old 12-07-2004, 11:51 PM   #4
LQ Newbie
Registered: Jun 2004
Location: Monterey, California
Distribution: Fedora Core 4
Posts: 10

Rep: Reputation: 0
Good Summary, Kevin! And THANKS!

Good summary of the basics--nice of you to take the time to write this up for others! One additional point--many java programs will allow you to specify the JVM you want to use via the -vm switch after the program executable. To use this (for example, if you have multiple versions of the JVM on your machine), you would just specify "-vm <path to correct version of your JVM> after the executable command. Hope this helps some of your readers who need some advanced information.
Old 12-19-2004, 06:41 AM   #5
LQ Newbie
Registered: Jun 2004
Location: USA
Distribution: Fedora Core 2
Posts: 15

Original Poster
Rep: Reputation: 0
Java VM

Thanks for the advice guys, i just wrote this early one moring after spending a whole night trying to get it to work on my FC2 machine. I thought it would be good to pass my knowledge on from what I found.
Old 08-09-2005, 05:35 AM   #6
Senior Member
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51
Fedora Core 4 release notes now recommends that you DO NOT use Sun's JDK packages (see description of bugs). You should build the package from the JPackage Project instead.

The full instructions for building it are here; and the following is a summary of the steps:
1. become root
2. install the "java-1.5.0-sun-" package, with something like this:
rpm -i
3. it extracts stuff into /usr/src/redhat
4. download the "jdk-1_5_0_05-linux-i586.bin" file from Sun website and put it in /usr/src/redhat/SOURCES
5. run
rpmbuild -ba /usr/src/redhat/SPECS/foo.spec
6. in the /usr/src/redhat/RPMS/i586 directory, it makes the following RPMs that you can install:

* java-1.5.0-sun- - JRE (required)
* java-1.5.0-sun-devel- - JDK
* java-1.5.0-sun-src- - sources
* java-1.5.0-sun-demo- - demonstration files
* java-1.5.0-sun-plugin- - browser plugin
* java-1.5.0-sun-fonts- - fonts
* java-1.5.0-sun-alsa- - ALSA support
* java-1.5.0-sun-jdbc- - JDBC/ODBC bridge driver

7. If you install browser plugin and want to make it work, do something like this:
cd /usr/lib/mozilla/plugins
ln -s /etc/alternatives/jre/plugin/i386/ns7/ .

Last edited by spooon; 10-28-2005 at 03:40 PM.
Old 08-09-2005, 08:24 PM   #7
LQ Newbie
Registered: Jun 2004
Location: USA
Distribution: Fedora Core 2
Posts: 15

Original Poster
Rep: Reputation: 0
Thank you Spooon, these are some good updated instructions for FC4, seeing as how I wrote this for FC2, this is probably pretty outdated.
Old 08-18-2005, 12:06 PM   #8
LQ Newbie
Registered: Aug 2004
Distribution: Fedora C3
Posts: 12

Rep: Reputation: 0

Is there another way I should be following to install on a RedhatES4 system?

If I run the rpmbuild command I get an error:
Bad exit status from /var/tmp/rpm-tmp.72538 (%prep)

Nothing built.




Nevermind screwup. Gotit.

Last edited by ArenaJAG; 08-18-2005 at 04:00 PM.
Old 10-28-2005, 02:54 PM   #9
LQ Newbie
Registered: Oct 2005
Location: Canada
Distribution: Fedora Core 4
Posts: 1

Rep: Reputation: 0
Hi Spoon,

the instructions you give in seem to be exactly what I need, thank you! However the link
seems to be old. Do you know where I could find this rpm today?

Thanks again
Old 10-28-2005, 03:34 PM   #10
Senior Member
Registered: Aug 2005
Posts: 1,755

Rep: Reputation: 51

By the way, there is an article on FedoraNews that describes this method of installation (although a slightly different way of doing it).

Last edited by spooon; 10-28-2005 at 03:36 PM.


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
DISCUSSION: Install KDE 3.4 in Fedora Core 3 without Applications Crashing hari_seldon99 LinuxAnswers Discussion 6 08-17-2005 06:38 PM
Install Java development environment on Fedora Core 2 WesleyVH Linux - Software 2 10-13-2004 10:50 AM
Sun's Java VM (HOWTO) kevcart3 Linux - Software 0 09-23-2004 06:40 AM
Java Install Trouble with Fedora Core 2 Thats_My_Camino Programming 0 09-15-2004 06:40 PM
apt and java install Fedora Core 2 tommytomato Linux - Newbie 14 06-04-2004 05:05 AM > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion

All times are GMT -5. The time now is 07:34 AM.

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