Tag Archive : java

/ java

Installing JAVA to Slackware64 14.0

December 3, 2015 | Article | 2 Comments

JAVA is one of popular programming language today. Made by Sun Microsystem, and later bought by Oracle. However, JAVA programming language is restricted so most linux distribution not include it. This article will discuss about installing latest JAVA 7 (January 15th, 2013) to Slackware Linux 64 bit.

What we need:

  1. Slackware 64 bit, version 14.0
  2. Oracle’s JRE or JDK
  3. SlackBuild script

The Latest JAVA version per January 15th 2013 would be Java 7u11. You can download the binary from here. Decide what you want to install, either the JDK or JRE but not both. If you are developing application for JAVA, use JDK instead of JRE. Use JRE if you only want to run some application but not developing one. Thus, JDK might be safe choice for you.

If you want to install Oracle JRE you may download the jre-7u11-linux-x64.tar.gz. The JDK version would be jdk-7u11-linux-x64.tar.gz. Be sure you have accept the license agreement otherwise you can’t download it. And remember to download only the .tar.gz version to follow this article.

Now, download the slackbuild script. You can visit here. Actually you can read the README file but let this article be your only source hahaha ^^.

Update 2: There’s now a script that can repackage Oracle’s JRE or JDK into a Slackware package here (64-bit here). Just follow the instructions in the README file. Again, here is some information about installing OpenJDK.

What you must download:

  1. java.SlackBuild
  2. slack-desc.jdk or slack-desc.jre (depend on what you want to install)
  3. some script on profile.d/

Now, download all the required material and place in on same directory. Let say /tmp/java

execute the slackbuild script by invoking

/bin/sh java.SlackBuild

Wait until the process finished and you will get a new installation file on /tmp. Install it by invoking (for JDK):

upgradepkg --install-new /tmp/jdk-7u11-x86_64-1.txz

If you want to install JRE you would get jre one, so install it by invoking:

upgradepkg --install-new /tmp/jre-7u11-x86_64-1.txz

Congratulations! You have successfully install Java to your system. But wait, it’s not finished yet.

Our installation would be on /usr/lib64/java directory so we must update our environment variable so the system can find the JAVA. If you are using bash you can edit ~/.bashrc using nano or vi and add this snippet in the end of your file (or you must create new one if you don’t have any)

export JAVA_HOME=/usr/lib64/java export PATH="${PATH}:${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin" 
export MANPATH="${MANPATH}:${JAVA_HOME}/man"

Now reopen your shell and type java.

And that’s all 😀

Social media & sharing icons powered by UltimatelySocial