HOWTO Install Sun Java Development Kit on Fedora Core
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.
Download it[edit | edit source]
First, you need to download J2SE from Sun's website.
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).
Install it[edit | edit source]
First, become root.
The simplest way to install it (described here) is using JPackage. First, download the keys:
rpm --import http://jpackage.org/jpackage.asc
Then make yum use it:
cd /etc/yum.repos.d wget http://jpackage.org/jpackage.repo
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 ./jdk-1_5_0_09-linux-i586-rpm.bin
You'll have to read their "terms of service" and type "yes".
Then install the JPackage.org 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:
What files were put where[edit | edit source]
You can check what files where affected with:
rpm -q -l java-1.5.0-sun-compat
Selecting Java-engine[edit | edit source]
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
Sources[edit | edit source]
- ccl.net: CCL Sun Java Development Kit on FC6