The Java Runtime Environment or JRE is the software required to run any application deployed on the Java Platform.
Java SDK consists from JRE and development tools such as the Java compiler, Javadoc, and debugger. This is more commonly known as the JDK.
There are most popular JDK implementations:
- download archive with OpenJDK
- unzip archive
- set system variable JAVA_HOME to jdk
- add %JAVA_HOME%/bin to PATH variable
- configure you IDE
Below instruction how install OpenJDK on Ubuntu.
# check current java version java -version # update repository apt-get update # install repository apt-get install openjdk-8-jdk # set system variable to current jdk export JAVA_HOME=path_to_java_home # check version again java -version # It is possible has multiple installed jdk/jre # check list of installed jdk/jre update-alternatives --get-selections # select current default jdk update-alternatives --set java /usr/lib/jvm/jdk1.8.0_version/bin/java # or update-alternatives --config java