Warning: This blog entry was written two or more years ago. Therefore, it may contain broken links, out-dated or misleading content, or information that is just plain wrong. Please read on with caution.
Slackware comes with a java runtime environment (jre) installed but not the development kit (JDK). Also it is several versions behind the most recent release. Our goal here is to install both the JRE the Java Runtime Environment and the JDK the Java Development Kit.
Step 1:Uninstall current JRE
Run pkgtool to uninstall the jre
//Select the installed jre
Step 2: Download current JDK
The JDK comes with the jre as a packwage so we dont need to worry about that seperatly. Login to KDE and open a browser. Go to oracle website OracleWebsite and download current jdk[version].bin self extracting file for linux. Place this file in /usr/local/ for now.
Step 3: Run the self extracting file
Give the binary file permission to execute and then run
# cd /usr/local
# chmod 755 jdk[version].bin
Agree to the licence and the binary will extract to the current directory. Create a symlink to this folder
# ln -s jdk[version] java
Step 4: Set environment variables
Set the JAVA_HOME environment variable, by modifying /etc/profile so it includes the following:
# vi /etc/profile
/etc/profile is run at startup and when a user logs into the system, so you will need to log out and log back in for JAVA_HOME to be defined. Check to make sure JAVA_HOME is defined correctly using the command below. You should see the path to your Java SDK as /usr/local/java
//get the java path
# echo $JAVA_HOME
//get the java version
# java -version
Step 5: Manually install firefox plugins
GOTO Firefox plugins directory and create a symbolic link to the .so file in the jre directory.
# cd /usr/lib/firefox/plugins
# ln -s /usr/local/java/jre/lib/i386/libnpjp2.so
Restart firefox and check the plugins in
You should see the java plugin listed