HOWTO Install Sun Java Development Kit on Fedora Core

From LinuxReviews
Jump to: navigation, search

Fedora Core 6 (or any other Linux distribution) does not come with Sun's original Java-implementation. FC6 comes with the GNU Java, which does not run many Java-program.s This is how you can install Sun's Java-engine on Fedora Core 6.


[edit] Download it

First, you need to download J2SE from Sun's website.

Go to

Select Java 2 Platform, Standard Edition (J2SE). Choose the latest edition (JDK 5.0 Update X), and download the Linux RPM self-extracting file (Not the "Linux self-extracting file", make sure you get the RPM).


[edit] Install it

First, become root.

su -

The simplest way to install it (described here) is using JPackage. First, download the keys:

rpm --import

Then make yum use it:

cd /etc/yum.repos.d

Check if you have the needed RPM tools,

rpm -qi rpm-build
rpm -qi fedora-rpmdevtools

and install them if you don't:

yum install fedora-rpmdevtools
yum install rpm-build

Now, install the package downloaded from Sun:

chmod u+x jdk-1_5_0_09-linux-i586-rpm.bin

You'll have to read their "terms of service" and type "yes".

Then install the SUN JDK compatibility RPM:

yum --enablerepo=jpackage-generic-nonfree install java-1.5.0-sun-compat

This sets up Sun's java engine as the default "java" and "javac" commands. You can verify this by typing:

java -version

[edit] What files were put where

You can check what files where affected with:

rpm -q -l java-1.5.0-sun-compat

[edit] Selecting Java-engine

If you've done as above then Sun's java is now the default. You can choose between different java-implementations with "alternatives" read "man alternatives" to see how it works).

You can select java-engine with:

alternatives --config java

[edit] Sources

Personal tools
hardware tests
Privacy policy
linux events


linux newz | random page | poetry | free blog