Install the Sun Java JDK or JRE
For Java code developers and end-users, the Java 2 JDK (or J2SE) is distributed at http://java.sun.com/j2se/.
For Java end-users who feel they're tight on space or don't want to download the full J2SE package, the Java 2 Runtime Edition (or J2RE) is also available on the Sun download pages.
Download the appropriate RPM distribution. This is simpler than the "tarball" variety and easier to manage when Java updates become available. It is packaged inside a .bin file which is an install script. To extract the distribution, you must execute the .bin file and accept Sun's licensing terms. Then you can install the .rpm file that was extracted.
(This assumes a version of J2SE that is exactly 1_4_1-fcs-linux-i586. If your RPM has a different version number or filenames, adjust these examples accordingly. Match the underscores and dots carefully.)
$ sh ./j2sdk-1_4_1-fcs-linux-i586.rpm [... view and accept Sun's licensing terms] $ su - # rpm -ivh j2sdk-1_4_1-fcs-linux-i586.rpm
Follow the instructions to accept Sun's EULA and extract the JDK or J2RE package. Once it has been extracted, use the rpm tool as the root user to install the package itself.
Once installed, the JDK tools still must be added to the path. To add these settings for all users, add them to the /etc/profile.d/* scripts. The name should be java.sh for all bash users, and its entire contents are shown below. A similar script could be named java.csh for users of other shell types.
/etc/profile.d/java.sh (full example file) export JDK_HOME=/usr/java/j2sdk1.4.2_07 export PATH=$PATH:$JDK_HOME/bin
The first line sets a variable which some Java environments such as Forte may detect, to help them locate the developer kit files properly. Many environments can auto-detect your proper version.
The second line adds the Java tools to your shell's path. This is required, otherwise running javac or other tools may result in "command not found" errors from your shell.
If you want to use these settings right away, you can issue a quick source /etc/profile.d/java.sh command. This is only required if you want to use the newly installed Java tools in the same login session; subsequent login sessions will use the java.sh file automatically.
Also, in newer Fedora releases, if there is a gcc version of javac installed, you may wish to disable it.
$ source /etc/profile.d/java.sh $ [ -x /usr/bin/javac ] && sudo mv /usr/bin/javac /usr/bin/gcc-javac
Install the Java Plugin for Mozilla or Galeon
Install the Sun Java JDK (J2SE) or the smaller runtime-only (J2RE), per above instructions.
Determine the Mozilla plugin path, and the Java JDK plugin path. Put a symbolic link to Java's Netscape 6 (ns600 or ns610) plugin in the Mozilla plugin directory. If there are multiple /usr/lib/mozilla* paths, the latest numbered one is appropriate.
Galeon is another web browser that uses the Mozilla engine, including the plugin mechanisms. Adding a plugin to Mozilla will also add it to the Galeon browser's capabilities.
$ su - # cd /usr/lib/mozilla-1.0.1/plugins # find /usr/java -name "libjavaplugin*" /usr/java/j2sdk1.4.1/lib/i386/libjavaplugin_jni.so /usr/java/j2sdk1.4.1/jre/plugin/i386/ns600/libjavaplugin_oji.so /usr/java/j2sdk1.4.1/jre/plugin/i386/ns610/libjavaplugin_oji.so # ln -s /usr/java/j2sdk1.4.1/jre/plugin/i386/ns610/libjavaplugin_oji.so .
If multiple plugins are provided in the package, listed by the find command, choose the one with the highest NS version number, such as the ns610 example above. Link that file to the mozilla plugin directory.
Quit all copies of Mozilla and Galeon, then test the plugin by browsing any website which offers Java plugins. (Strangely, the Java home page at Sun's website has been redesigned and exhibits no applets. http://java.sun.com/)
Contact Ed Halley by email at
Text, code, layout and artwork are Copyright © 1996-2005 Ed Halley.
Copying in whole or in part, with author attribution, is expressly allowed.
Any references to trademarks are illustrative and are controlled by their respective owners.