Configuração JDK
Configuração JDK
16.04
Published on: Fri, Dec 15, 2017 at 12:06 pm EST
Java Linux Guides Ubuntu
In this guide, you'll learn how to manually install Java 8 on Ubuntu 16.04. The instructions in this
tutorial will work on other versions of Ubuntu as well, including 14.04, 16.10, and 17.04.
Prerequisites
1. A text editor, whether it's vi, vim, emacs, etc.
Update the existing PATH variable by adding the below bin folders, separated with a colon :.
/usr/lib/jvm/jdk1.8/bin:/usr/lib/jvm/jdk1.8/db/bin:/usr/lib/jvm/jdk1.8/jre/bin
HOME directory paths can be different based on version and update,here the version is 1.8 and the
update is 151. Add the below variables at the end of environment file, making changes for your
specific version and update.
J2SDKDIR="/usr/lib/jvm/jdk1.8.0_151"
J2REDIR="/usr/lib/jvm/jdk1.8.0_151/jre"
JAVA_HOME="/usr/lib/jvm/jdk1.8.0_151"
DERBY_HOME="/usr/lib/jvm/jdk1.8.0_151/db"
The environment file should now be similar to this text:
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/
usr/local/games:/usr/lib/jvm/jdk1.8.0_151/bin:/usr/lib/jvm/jdk1.8.0_151/db/
bin:/usr/lib/jvm/jdk1.8.0_151/jre/bin"
J2SDKDIR="/usr/lib/jvm/jdk1.8.0_151"
J2REDIR="/usr/lib/jvm/jdk1.8.0_151/jre*
JAVA_HOME="/usr/lib/jvm/jdk1.8.0_151"
DERBY_HOME="/usr/lib/jvm/jdk1.8.0_151/db"
You should be able to see your installed java version which means you have successfully installed
the Oracle JDK.