- Make a folder for your Java installs, e.g.
sudo mkdir /usr/local/java/
- Download & extarct there a
.tar.gz
from Oracle (here I will be usingjdk-8u60-linux-x64.tar.gz
); - Create a file
/etc/profile.d/oraclejdk.sh
with the following content (adapt the paths to reflect the path where you stored your JDK):
export J2SDKDIR=/usr/local/java/jdk1.8.0_60/ export J2REDIR=/usr/local/java/jdk1.8.0_60/jre export PATH=$PATH:/usr/local/java/jdk1.8.0_60/bin:/usr/local/java/jdk1.8.0_60/db/bin:/usr/local/java/jdk1.8.0_60/jre/bin export JAVA_HOME=/usr/local/java/jdk1.8.0_60 export DERBY_HOME=/usr/local/java/jdk1.8.0_60/db
source /etc/profile.d/oraclejdk.sh
.(slightly modified source)
No comments:
Post a Comment