
Fedora came with OpenJDK Java Runtime Environment, which is a part of Fedora Project. However, many applications still require Sun’s Java. When I tried to install FreeMind, a mind mapping software in Java, it required Sun’s JRE. I installed the Sun’s JRE as following steps successfully.
My environment is Intel Dual Core 32-bit CPU, 4GB Memory, Fedora 12.
1. Download:
Download the latest JDK or JRE at http://java.sun.com/javase/downloads/index.jsp. What I downloaded was jre-6u18-linux-i586.rpm.
2. Install:
Once download you will install the package with:
On x86:
su -c ’sh jre-6u18-linux-i586.rpm’
or
On x86_64:
su -c ’sh jre-6u18-linux-x64-rpm.bin’
You’ll have to agree to the license by pressing q, then typing yes.
3. Replace:
First lets make sure that Fedora will use Sun Java instead of OpenJDK which is done with the alternatives
command:
su -c ‘/usr/sbin/alternatives –install /usr/bin/java java \
/usr/java/default/bin/java 20000′
4. Setup Plugin:
Now you want to setup the Sun Java Plugin for your firefox browser:
For x86:
su -c ‘/usr/sbin/alternatives –install \
/usr/lib/mozilla/plugins/libjavaplugin.so libjavaplugin.so \
/usr/java/default/plugin/i386/ns7/libjavaplugin_oji.so 20000′
For x86_64:
su -c ‘/usr/sbin/alternatives –install \
/usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 \
/usr/java/default/lib/amd64/libnpjp2.so 20000′
You can do the same for your Opera browser if you wish:
For x86
su -c ‘/usr/sbin/alternatives –install \
/usr/lib/opera/plugins/libjavaplugin.so libjavaplugin.so \
/usr/java/default/plugin/i386/ns7/libjavaplugin_oji.so 20000′
For x86_64:
su -c ‘/usr/sbin/alternatives –install \
/usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 \
/usr/java/default/lib/amd64/libnpjp2.so 20000′
Note: The \’s indicated in the above commands are to break the line. If you are typing it yourself, you can type it without the \ as a single line installation, or just copy and paste the above into your terminal.
After you setup the browser plug-ins you’ll have to close your browser.
5. Verify:
To verify your plug-in are being used by your browser type: about:plugins in the address bar to get a screen displaying all plugins.
In command line, you can verify by issuing command like:
java -version
java version “1.6.0_18″
Java(TM) SE Runtime Environment (build 1.6.0_18-b07)
Java HotSpot(TM) Server VM (build 16.0-b13, mixed mode)