Search This Blog

Tuesday, May 19, 2020

Linux Ubuntu - OpenJdk Java 13 Install Setup

To uninstall OpenJDK
> sudo apt-get autoremove openjdk*
> sudo apt-get purge openjdk*
  
Install > 1.9 JDK 1.3

> sudo apt install -y curl

> curl -O https://download.java.net/java/GA/jdk13/5b8a42f3905b406298b72d750b6919f6/33/GPL/openjdk-13_linux-x64_bin.tar.gz

> tar xvf openjdk-13_linux-x64_bin.tar.gz

> sudo mv jdk-13 /usr/java/

> sudo nano /etc/profile
     # Go to after fi end and paste the below lines
    JAVA_HOME=/usr/java/jdk-13.0.2
    PATH=$PATH:$HOME/bin:$JAVA_HOME/bin
    export JAVA_HOME
    export JRE_HOME
    export PATH


# Configure Java Alternatives
> sudo update-alternatives --install "/usr/bin/java" "java" "/usr/java/jdk-13.0.2/bin/java" 1

# Configure Javac Alternatives
> sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/java/jdk-13.0.2/bin/javac" 1

# Check version
> java -version

# Use only in case of multiple JDKs installed

# Configure Java
> sudo update-alternatives --config java

# Configure Java Compiler
> sudo update-alternatives --config javac

>javac -version

>java version


No comments:

Hit Counter


View My Stats