How to install Oracle Java inside Ubuntu, Debian, Linux Mint, 2019. Updated
Видео взято с канала: Nirojan Selvanathan
StackOverflow question link:
https://stackoverflow.com/questions/10268583/downloading-java-jdk-on-linux-via-wget-is-shown-license-page-instead/.
Step 1:
wget -no-cookies -no-check-certificate -header \»Cookie: oraclelicense=accept-securebackup-cookie\» \»orclejdkurl\».
Step 2:
sudo mkdir /usr/lib/jvm.
cd /usr/lib/jvm.
Step 3.
sudo tar -xvzf /home/nirojan/jdk-12.0.1_linux-x64_bin.tar.gz.
Step 4:
sudo nano /etc/environment.
# path:/usr/lib/jvm/jdk-12.0.1.
JAVA_HOME=\»/usr/lib/jvm/jdk-12.0.1\».
Step 5:
sudo update-alternatives -install \»/usr/bin/java\» \»java\» \»/usr/lib/jvm/jdk-12.0.1/bin/java\» 0.
sudo update-alternatives -install \»/usr/bin/javac\» \»javac\» \»/usr/lib/jvm/jdk-12.0.1/bin/javac\» 0.
sudo update-alternatives -set java /usr/lib/jvm/jdk-12.0.1/bin/java.
sudo update-alternatives -set javac /usr/lib/jvm/jdk-12.0.1/bin/javac.
Step 6:
update-alternatives -list java.
update-alternatives -list javac.
Step 7.
java -version.
echo $JAVA_HOME
Видео взято с канала: Nirojan Selvanathan
Нет похожих статей