Answers for "jdk 13 ubuntu install"


how to install java jdk 13 on linux

sudo apt install -y curl
curl -O
tar xvf openjdk-13_linux-x64_bin.tar.gz

sudo mv jdk-13 /opt/
  sudo tee /etc/profile.d/ <<EOF
  export JAVA_HOME=/opt/jdk-13
  export PATH=\$PATH:\$JAVA_HOME/bin
source /etc/profile.d/


java -version

### Second Approach to install java 13 along side other java versions
## Check this link

curl -O
tar xvf openjdk-13_linux-x64_bin.tar.gz
export JAVA_HOME=<Directory where JAVA has been extracted>/jdk-13
export PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
. /etc/profile
sudo update-alternatives --install "/usr/bin/java" "java" "<Directory where JAVA has been extracted>/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "<Directory where JAVA has been extracted>/bin/javac" 1  
sudo update-alternatives --set java <Directory where JAVA has been extracted>/bin/java
sudo update-alternatives --set javac <Directory where JAVA has been extracted>/bin/javac
java -version
javac -version
Posted by: Guest on March-28-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language