Starting with Fedora 9, OpenJDK is now available directly (adapted from Sun Java) with Fedora. Most applications using OpenJDK should work, but some may not. As a result, I still prefer installing JRE since OpenJDK is not yet fully compatible to Java.
Be sure that SELinux has been configured properly before starting (see the SELinux page):
~> sudo chcon -t execmem_exec_t /usr/lib64/firefox-3.6/firefox
Open your favorite web browser and go to Sun's download page for Java SE, which is located at:
Scroll down the page and look for the latest update to the "Java Platform, Standard Edition". Click on the Download JRE button, choose Linux x64 under Platform, and click the button to accept the license agreement. Then click Continue. Choose the RPM link, which corresponds to jre-6u23-linux-x64-rpm.bin (as of this writing). After it downloads, execute the binary RPM using sh:
~> sudo sh ~/Downloads/jre-*-rpm.binWait for the RPM installation to complete.
Configuring Java for Other Applications
To configure java for additional applications, we will use the alternatives command:
~> sudo alternatives --install /usr/bin/java java /usr/java/default/bin/java 20000This configures JRE as an alternative to the generic java implementation that comes bundled with F14 and OpenJDK. The default version is given the lowest priority, to ensure that JRE will always be used first:
~> sudo /usr/sbin/alternatives --display javaTo configure the Mozilla/Firefox browser plugin:
~> sudo alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so \ libjavaplugin.so.x86_64 /usr/java/default/lib/amd64/libnpjp2.so 20000You are now able to install and run Java applications! To test it, restart Firefox, and go to http://www.java.com/en/download/help/testvm.xml.