Java is a cross-platform, object-oriented programming language developed by the Sun Microsystems in the year 1995. Today, java is used by the billion’s of devices, games, media players, audio vide applications etc.
As of today Java SE 15 is the latest version available for the installation. JDK 16 will be the next version expected to release in March, 2021. Both are the short term releases supports till next release only. After that JDK 17 will the next Long-Term Support release, will be supported for approx. eight years.
Java installation tutorials:
- Install Java on Ubuntu 20.04
- Install Java on Debian 10
- Install Java on CentOS 8
- Install Java on macOS
This tutorial described you to how to check Java version installed on a system.
Check Java Version
Java comes in two types of installations. You can either install Java Development Kit (JDK) or install Java Runtime Environment (JRE) only.
The JDK installation also includes the JRE. JDK is uses to compile java programs is basically installed on development systems. Where JRE is uses to run java programs compiled by the JDK. The JRE is required to install or production servers, where we only run the applications.
- Check Java Runtime Version – You can use
-version
command line argument prints version details on error stream, also you can use--version
prints java version details on standard output. Open a terminal (CTR+ALT+T) and type:java --version
java 11 2018-09-25 Java(TM) SE Runtime Environment 18.9 (build 11+28) Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11+28, mixed mode)The above output shows that you have installed Java SE 11 on your system.
- Check Java Compiler Version – javac is the compiler used to create bytecode from Java source code. Java compiler is installed with Java Development Kit (JDK). Use below command to view java compiler version.
javac --version
javac 11
Conclusion
In this tutorial, you have learned about finding hte installed JDK or JRE versions on any system.