aboutsummaryrefslogtreecommitdiff
Installing OpenJDK

Installing OpenJDK

This page describes how to install an OpenJDK binary tarball. The latest binary tarballs for OpenJDK may be downloaded from the releases page which maintains a monthly rolling release of OpenJDK 7,8 & 9.

The tarball may be untarred as a normal user, there is no need to untar it as root. So, for example, in your home directory just do.

tar xf jdk8-server-release-2014-11-20.tar.gz

This will create a directory jdk8-server-release-2014-11-20 containing the JDK.

Replace the "-2014-11-20" with the correct date for the version you downloaded.

To run java do

<install location>/jdk8-server-release-2014-11-20/bin/java

The binary tarballs provided by Linaro are full JDK tarballs. IE they include the javac compiler and all the development tools you need to develop Java. So for example to compile and run the Queens.java test program do.

<install location>/jdk8-server-release-2014-11-20/bin/javac Queens.java
<install location>/jdk8-server-release-2014-11-20/bin/java Queens

However...

OpenJDK relies on certain (in fact many) other packages being installed on your Linux system before it will run correctly! If these packages are not installed it will not run very well, or maybe not at all.

The easiest way to install the packages required by OpenJDK is to install the version of java that came with your disto. This will pull in all the necessary packages.

So, for example, on an RPM based system such as Red Hat Enterprise Linux Server for ARM (Development Preview release 1.5) execute the following.

sudo yum install java-devel

Please ensure you install the java-devel package rather than the java package if you wish to do any development with Java such as building OpenJDK.

The following is a list of dependancies installed on Redhat Preview release 1.5.

atk cairo cups-libs flac-libs fontconfig fontpackages-filesystem giflib graphite2 gsm gtk2 harfbuzz hicolor-icon-theme java-1.7.0-openjdk-headless javapackages-tools lcms2 libICE libSM libXcomposite libXcursor libXdamage libXext libXfixes libXfont libXft libXi libXinerama libXrandr libXrender libXtst libXxf86vm libasyncns libfontenc libogg libsndfile libthai libvorbis mesa-libEGL mesa-libGL mesa-libgbm mesa-libglapi pango pixman pulseaudio-libs python-javapackages ttmkfdir tzdata-java xorg-x11-font-utils xorg-x11-fonts-Type1

If you are not able to install java on your distro (because for example, the java package is not available in your distro) then you must install the above packages manually.