Install Java On Slackware 14.1

Install Java On Slackware 14.1

Let’s show you how to install java JDK in Slackware 14.1, also with the same way you can install the JRE  version :

root@slack:~# hostname
root@slack:~# uname   -a
Linux slack 3.10.17-smp #2 SMP Wed Oct 23 17:13:14 CDT 2013 i686 Intel(R) Core(TM) i5-2520M CPU @ 2.50GHz GenuineIntel GNU/Linux
root@slack:~# cat /etc/slackware-version
Slackware 14.1

Let’s  begin:

1. Download the JDK

Please not if you are using the text mode verify the certificate with wget, else download locally and upload it to the  slackware machine.

2. Download jdk.SlackBuild, slack-desc, and profile.d from

3. Edit the java.slackbuild script with the java version on line 40.


4. Chmod +x java.SlackBuild and  run

./java.SlackBuild   jdk-7u45-linux-x64.tar.gz

5. Install the generated slackware package in tmp folder with:

root@slack:~# installpkg   /tmp/jdk-7u45-i586-1.txz
Verifying package jdk-7u45-i586-1.txz.
Installing package jdk-7u45-i586-1.txz:
# Java(TM) 2 Platform Standard Edition Development Kit.
# The Java 2 SDK software includes tools for developing, testing, and
# running programs written in the Java programming language.  This
# package contains everything you need to run Java(TM).
# For additional information, refer to this web page:
Executing install script for jdk-7u45-i586-1.txz.
Package jdk-7u45-i586-1.txz installed.

add java folder to your profile.

vi  /etc/profile


export JAVA_HOME="/ur/lib/java/"

read again the new profile setting.

root@slack:~# source /etc/profile

Check your Java version.

root@slack:~# java  -versionjava version "1.7.0_45"
Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
Java HotSpot(TM) Client VM (build 24.45-b08, mixed mode)

Install Java pulgin

cd root@slack:~# cd   /usr/lib/mozilla/plugins/

make Symbolik  link to  java plugin

root@slack:/usr/lib/mozilla/plugins# ln -s /usr/lib/java/jre/plugin/i386/ns7/
root@slack:/usr/lib/mozilla/plugins#ls -altr
rwxr-xr-x 1 root root 66236 Jul  5 22:27*
lrwxrwxrwx 1 root root    38 Nov 14 14:54 -> /usr/lib/java/jre/lib/i386/*
lrwxrwxrwx 1 root root    54 Nov 14 15:29 -> /usr/lib/java/jre/plugin/i386/ns7/

I tested how-to this on my Slackware desktop. It worked for me 100%.


  • Rooster

    Hello for you,

    Can you explain how to install the JDK in a custom user defined path?


  • Mel Kham

    Extract tar,gz manually to /home/user/java, from your back profile add export JAVA_HOME=/home/user/java/…… , source ~/.bass_profile or re-login again

  • Chick Tower

    I just want to point out that the link to the jdk.SlackBuild actually points to the one for version 13.37, not 14.1. It’s easily corrected in a web browser, but one has to notice the version in the address bar before one can correct it.

  • drummer_va

    @Mel Kham

    Thank you for a great tutorial. I have read it very carefully and I noticed one typo that can mislead novice user and potentially create problem – there is one “s” missing in export line :). There should be – export JAVA_HOME = “/usr/lib/java”.
    I hope that you do not take my post as offensive, and I apologize if I cause you any trouble writing this post.
    Keep up the good work!
    Best Regards