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
|
er
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 |
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 j2re.sh in /etc/profile.d/ containing the following: Code:
#!/bin/sh Watch what this does - Code:
[buildmaster@devel ~]$ which java 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. |
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.
|
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.
|
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-1.5.0.05-1jpp.nosrc.rpm" package, with something like this: Code:
rpm -i http://mirrors.dotsrc.org/jpackage/1.6/generic/non-free/SRPMS/java-1.5.0-sun-1.5.0.05-1jpp.nosrc.rpm 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 Code:
rpmbuild -ba /usr/src/redhat/SPECS/foo.spec * java-1.5.0-sun-1.5.0.05-1jpp.i586.rpm - JRE (required) * java-1.5.0-sun-devel-1.5.0.05-1jpp.i586.rpm - JDK * java-1.5.0-sun-src-1.5.0.05-1jpp.i586.rpm - sources * java-1.5.0-sun-demo-1.5.0.05-1jpp.i586.rpm - demonstration files * java-1.5.0-sun-plugin-1.5.0.05-1jpp.i586.rpm - browser plugin * java-1.5.0-sun-fonts-1.5.0.05-1jpp.i586.rpm - fonts * java-1.5.0-sun-alsa-1.5.0.05-1jpp.i586.rpm - ALSA support * java-1.5.0-sun-jdbc-1.5.0.05-1jpp.i586.rpm - JDBC/ODBC bridge driver 7. If you install browser plugin and want to make it work, do something like this: Code:
cd /usr/lib/mozilla/plugins |
Thank you Spooon, these are some good updated instructions for FC4, seeing as how I wrote this for FC2, this is probably pretty outdated.
|
Spoon
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. Thanks, JAG EDIT: Nevermind :newbie: screwup. Gotit. |
Hi Spoon,
the instructions you give in LinuxQuestions.org seem to be exactly what I need, thank you! However the link http://mirrors.dotsrc.org/jpackage/1.6/generic/non-free/SRPMS/java-1.5.0-sun-1.5.0.04-1jpp.nosrc.rpm seems to be old. Do you know where I could find this rpm today? Thanks again /Chris |
http://mirrors.dotsrc.org/jpackage/1...1jpp.nosrc.rpm
By the way, there is an article on FedoraNews that describes this method of installation (although a slightly different way of doing it). |
All times are GMT -5. The time now is 06:04 PM. |