Verify Java version (Windows, Linux, Mac)

You are currently viewing Verify Java version (Windows, Linux, Mac)
Verify Java version

Verify java version on Linux, Windows or Mac in multiple ways. You can even verify Java version online, by even using a browser. Java commands and Java Gui are the most popular ways to verify Java version. In Windows, Linux and Mac, commands and GUI differs somewhat. Lets see how we can verify Java installation is complete and what version is installed on your machine

Java version is verified using the command ‘java -version’ on windows, Mac and Linux. From GUI, Java control panel’s about section, Java version is clearly visible. Oracle’s online page for Java verification is the fastest way to check Java version, using Java enabled browser.

Steps to Verify Java version on windows using Java control panel

  1. Click on start button and start menu.
  2. Navigate through the ‘applications and programs’ listed unless you see the Java folder
  3. Click on Java folder, choose ‘About’ option.
  4. You can now check the Java installed version.

Steps to check Java version on windows using Command prompt

  1. From start menu or run box, Open the Command Prompt.
  2. Write the command: java -version
  3. The output of this command will show the Java version installed on your window machine.

Steps to check Java version on windows using start menu

  1. Click on start button and start menu.
  2. Navigate through the ‘applications and programs’ listed unless you see the Java folder
  3. Click on Java folder, Java control panel will be opened.
  4. In General tab, press the ‘About’ button.
  5. You can now check the Java installed version.

Steps to check Java version on Linux using Java control panel

  1. In Linux, search the application “Java control panel”
  2. From the search list, Open the Java control panel.
  3. On General tab, press the button ‘About…’
  4. It will open a popup which will show the installed Java version and details.
Java control panel - Java version check
Java control panel – Java version check

Steps to check Java version on Linux using terminal

  1. Press ALT+CTRL+T  or Open the terminal from search.
  2. Enter the command:  java -version 
  3. The terminal will show the installed Java version on your Linux machine.

Steps to check Java version on Mac using Java control panel

  1. From upper left side of screen, select the Apple icon
  2. Navigate to System preferences.
  3. Press Java icon, it will launch Java control panel
  4. In General tab, press the button ‘About’
  5. You will see open a popup with details of Java installed version.

Steps to check Java version on Mac using terminal

  1. Open the terminal window.
  2. Enter this command: java -version
  3. The terminal window will show the installed version of Java on your Mac machine.

Steps to check Java version online

  1. Open the oracle’s Java verification web page.
  2. Press the button ‘Verify Java version’
  3. Accept the agreement and press Continue button
  4. Select Run to continue option
  5. The web page will show the Currently installed Java version.
  6. if you have recently finished Java installation, then restart your browser to enable, Java in the browser. Make sure JavaScript is enabled in the browser.

Where Java is installed?

You can find the Java installation path on Ubuntu using following command:

which javac

It will give path of Java installation directory, if you have multiple versions installed, then only the default Java version (set in your system) wll be displayed.

/usr/bin/javac

You can find the Java installation path on Ubuntu using following command:

where javac

It will give you Java installation path

C:\opt\jdk-8.0.2\bin\javac.exe

How to switch Java version

You can have multiple installed versions of JDK on one machine. At any time, You can decide which Java version you want to make default version and should be used from command line automatically. The update-alternatives command is very helpful in switching between JDk versions, it will list all the installed Java versions. From that list, you can select which is the default version, you can want to keep.

sudo update-alternatives --config java

All available Java versions will be listed as shown below, with a sequence number. You can select any Java version using these sequence numbers. An Asterisk (*) mark shows that this Java version is currently being used as default version.

There are n choices for the alternative java (providing /usr/bin/java).

Selection    Path               Priority              Status
------------------------------------------------------------
  0        /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      auto mode
* 1        /usr/lib/jvm/java-11-openjdk-amd64/bin/java      1111      manual mode
  2        /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java   1081      manual mode
  3        /usr/lib/jvm/java-8-oracle/jre/bin/java          1081      manual mode

Press <enter> to keep current choice[*], or  type selection number: 

Java version history

The Java language has undergone several changes since JDK 1.0 also as numerous additions of classes and packages to the core library. The evolution of Java language has been governed by the JCP (Java Community Process), which uses JSRs (Java Specification Requests) to specify changes and propose changes, for additions to the Java.
In addition to the language semantics, lots of other changes have been made to the Class Libraries over the years, which has now grown from a couple of hundred classes to over three thousand. Entire new APIs, like Swing and Java2D, are introduced, and lots of of the first JDK 1.0 classes and methods are deprecated.

YearJDK release
1995 yearJDK Beta
1996 JanJDK 1.0
1997 FebJDK 1.1
1998 DecJ2SE 1.2
2000 MatJ2SE 1.3
2002 FebJ2SE 1.4
2014 SepJ2SE 5.0
2006 DecJava SE 6
2011 JulyJava SE 7
2014 MarJava SE 8 (LTS)
2017 SepJava SE 9
2018 MarJava SE 10
2018 SepJava SE 11 (LTS)
2019 MarJava SE 12
2019 SepJava SE 13
2020 MarJava SE 14
2020 SepJava SE 15
2021 MarJava SE 16
2020 SepJava SE 17 (LTS)
Java version history

There are lots of OpenJDKs builds available, most of them are available to use freely for commercial purpose. But still few have different type od supports or licenses. Following is the list for different available OpenJDK builds.

OpenJDK BuildsLong Term SupportPermissive
license
Commercial Support
AdoptOpenJDKYesYesYes
IBM SDKYesYesYes
Alibaba DragonwellYesYesNo
Amazon CorrettoYesYesNo
Azul ZuluYesYesYes
BellSoft Liberica JDKYesYesYes
ojdkbuildYesYesNo
Oracle OpenJDKNoYesNo
Red Hat build of OpenJDKYesYesYes
SAP SapMachineYesYesNo
OpenJDKs build with download links

What is Java Auto Update? How do I change notify settings?

Java Update feature is a feature that keeps your computer up-to-date with the newest Java releases. once you have auto update enabled, your system periodically checks for latest versions of Java. When a latest version is found we ask your permission to upgrade your Java installation. you can schedule how often to see for updates, or check manually at any time.

Change Automatic Java Update Settings

  • Open the Java control panel window.
  • Click the Update tab and open settings section.
  • select the Check for Updates Automatically check box, To enable Java Updates automatically.
  • For disabling Java Updates, un-select the Check box for Updates Automatically check box.

Change the Java Update Schedule

  • You can also change the frequency for Java updates: monthly (default), weekly, or daily
  • On Update tab in Java Control panel window, click button Advanced
  • Advanced Settings dialog appears for the Automatic Update .Change frequency here using date and time for the Java Update and Click OK.
  • Java Update scheduler will now check for latest Java updates and notify you at the scheduled frequency.
  • For daily updates, you’ll select the time of the day for the update. For weekly updates, you’ll select the day of the week and therefore the time of the day. For monthly updates, you’ll select the day of the week and therefore the time of the day. Monthly updates check weekly and notify you within 30 days that an update is out there , however, if an update is taken into account critical you’re notified within every week of its release.

Change the Notification Options

There are two choices for changing notification options:
Before installing: Use this feature to download automatically and be notified before installing the Java update.
Before downloading: this is often the default . Use this feature to be notified before downloading and installing the Java update.

Manual Update Option

From the Java control panel Update tab, you’ll manually check for an update any time by clicking on the Update Now button located at rock bottom of the Update tab on the Java control panel . Java Update can only be run if the system is connected to the web . Alternatively, you’ll go to Java.com to find the newest Java version. After updating the Java version, you would like to shut and restart the Java control panel to load the updated control panel .

Conclusion

The choice of Java version depends upon your requirements and decision, but to verify Java version, options remain the same. Same commands can be used to check Java version for any JDK. If you want o have new Java installation and looking for Java installation detailed steps, then you can refer to my detailed guide on How to install Java.