Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu install Java #4

Open
Shellbye opened this issue Apr 25, 2018 · 0 comments
Open

Ubuntu install Java #4

Shellbye opened this issue Apr 25, 2018 · 0 comments
Labels
Java java Ubuntu Ubuntu

Comments

@Shellbye
Copy link
Owner

wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie;" http://download.oracle.com/otn-pub/java/jdk/8u171-b11/512cd62ec5174c3487ac17c61aaa89e8/jdk-8u171-linux-x64.tar.gz
tar -xf jdk-8u171-linux-x64.tar.gz
sudo mkdir -p /usr/lib/jvm/
sudo mv jdk1.8.0_171 /usr/lib/jvm/
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.8.0_171/bin/java" 1010
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.8.0_171/bin/javac" 1010
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.8.0_171/bin/javaws" 1010
java -version

cat >> /etc/profile.d/javajdk.sh << EOF
export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_171
EOF

source /etc/profile.d/javajdk.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Java java Ubuntu Ubuntu
Projects
None yet
Development

No branches or pull requests

1 participant