JDK 8 on Ubuntu |
Install JDK 8
Oracle JDK 8 stable version was released on 18th of March, 2014.
$ sudo add-apt-repository ppa:webupd8team/java
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
$ sudo apt-get update
$ sudo apt-get install oracle-java8-installer
Check Java Version
To check the version of Java. just check the version of java tool. To get a complete set of options just type java in terminal and hit enter.
$ java -version
java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java Hotspot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)
java version "1.8.0_11"
Java(TM) SE Runtime Environment (build 1.8.0_11-b12)
Java Hotspot(TM) 64-Bit Server VM (build 25.11-b03, mixed mode)
Check Javac tool version
$ javac -version
javac 1.8.0_11
javac 1.8.0_11
How to switch to JDK 7?
$ sudo update-java-alternatives -s java-7-oracle
To switch back to JDK8,
$ sudo update-java-alternatives -s java-8-oracle
No comments:
Post a Comment