You have been redirected from an outdated version of the article. Below is the content available on this topic. To view the old article click here.

Installing JDK 8 on a Debian-based GNU/Linux system

Java JDK 8 is required for running Structr. On a Debian-based GNU/Linux system, these are the steps to check and install the neccessary Java JDK 8 (Oracle Java 8 JDK or OpenJDK 8 JDK):

Check Java Version

root@localhost:~# java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

If JDK 7 is still installed, update to JDK 8.

Install apt-add-repository

The package apt-add-repository is a prerequisite for the following installation process. If apt-add-repository is not available on the system, you need to install the package software-properties-common.

apt-get install software-properties-common

Install OpenJDK 8 JDK

apt-add-repository ppa:webupd8team/java
apt-get update
apt-get install openjdk-8-jdk

Alternative: Install Oracle Java JDK 8

(If you’re not able or allowed to install OpenJDK 8 JDK.)

apt-add-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java8-installer
Make JDK 8 the System’s default
update-alternatives --config java
update-alternatives --config javac

Select the option matching your preferences.

Check Java and Maven versions

root@localhost:~# java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)
root@localhost:~# mvn -version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.7.0_45, vendor: Oracle Corporation
Java home: /opt/jdk1.7.0_45/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.18.9-x86_64-jb1", arch: "amd64", family: "unix"

If Maven is still using JDK 7:

De-install old JDK

apt-get purge oracle-java7-installer openjdk-6-jre-headless:amd64 openjdk-6-jre-lib openjdk-7-jre-headless:amd64

If you’ve got a JDK installed in a custom location, f.e. /opt/jdk1.7.0_45:

Remove custom JDK

rm -rf /opt/jdk1.7.0_45

Deactivate custom settings for JAVA_HOME

#export JAVA_HOME=/opt/jdk1.7.0_45

Sometimes it might be neccessary to logout and login again to have the new JDK version available.

You should check the Java version used by maven:

root@localhost:~# mvn -version
Apache Maven 3.0.5
Maven home: /usr/share/maven
Java version: 1.8.0_60, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-oracle/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "3.18.9-x86_64-jb1", arch: "amd64", family: "unix"

Search results for "Installing JDK 8 on a Debian-based GNU/Linux system"

We could not find anything matching "Installing JDK 8 on a Debian-based GNU/Linux system" in our documentation. Please rephrase your search.

You can also ask your questions in the Structr Google Group or create a free account in the Structr Support Portal.
Click here to send feedback to the Structr team.