Install Java On Slackware 14.1

by
Share this Article: Facebook0Google+0Twitter9LinkedIn1Reddit0StumbleUpon0

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
slack
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 http://www.oracle.com/technetwork/java/javase/downloads/index.html

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  http://mirrors.slackware.com/slackware/slackware-14.1/extra/source/java/

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

SOURCETGZ="$CWD/jdk-7u45-linux-x64.tar.gz"

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:
 PACKAGE DESCRIPTION:
 # 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:
 #   http://java.com/
 #
 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

add

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/libjavaplugin_oji.so
root@slack:/usr/lib/mozilla/plugins#ls -altr
rwxr-xr-x 1 root root 66236 Jul  5 22:27 skypebuttons.so*
lrwxrwxrwx 1 root root    38 Nov 14 14:54 libnpjp2.so -> /usr/lib/java/jre/lib/i386/libnpjp2.so*
lrwxrwxrwx 1 root root    54 Nov 14 15:29 libjavaplugin_oji.so -> /usr/lib/java/jre/plugin/i386/ns7/libjavaplugin_oji.so

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

cheers!

For questions please refer to our Q/A forum at : http://ask.unixmen.com/

Share this Article: Facebook0Google+0Twitter9LinkedIn1Reddit0StumbleUpon0