- How to check Java version and JDK version on Mac
- Checking Java version on macOS
- Checking JDK version on macOS
- How to Check Java Version on Mac or Windows
- Check Java Version on Mac
- Option 1: Check Java Version on Mac Using the GUI
- Option 2: Check Java Version on Mac Using the Terminal
- Check Java Version on Windows
- Option 1: Check Java Version on Windows Using GUI
- Option 2: Check Java Version on Windows Using Command Line
- How to Check Java Version on a Mac
- Checking Your System Preferences
- Reviewing the Java Website
- Getting Information from Your Terminal
- Expert Q&A
- Tips
- You Might Also Like
- About This Article
- Is this article up to date?
- Quizzes
- You Might Also Like
- How to Check Java Version
- About Java
- Versions of Java
How to check Java version and JDK version on Mac
Java is a class-based, object-oriented programming language that is fast and powerful and runs many important computing programs and platforms. When you are about to download new software on Mac, developers may have generated multiple app containers ( .dmg files) that install the software program in different ways depending on the operating system (macOS) and Java versions on your machine. In these situations, and others, it is very important to be able to quickly find out your Java and JDK versions on Mac.
In recent versions of Java for macOS, the default install location for some files has changed and the places to look to determine your Java version, or Java JDK (“Java Development Kit”; technically, now Java SE Development Kit, which stands for “Java Platform, Standard Edition Development Kit”; downloads here) version, have also changed accordingly.
There are two ways that I recommend checking your Java version, and there is one procedure that I like to use to check which JDK is currently in use on my MacBook Pro.
Checking Java version on macOS
1. System Preferences
This one is the easiest option for most users that like using the traditional, visual approach to computing on macOS. Simply open System Preferences (“Apple > System Preferences”), and then click “Java” (you will see the Java icon). The Java preferences open in a separate window, called “Java Control Panel.” In Java Control Panel, do either
The version that is presented in the Java Control Panel is the currently running (=usually recommended) version of Java on your Mac machine.
2. Command line (Terminal) procedure
This is the method preferred by most users who are more familiar with personal computing and the command line interface. Simply open a shell interpreter (command line interface) such as the Terminal application, and type
The Java executable on your local machine will output the appropriate Java versioning information. And voilà, you’re done!
On my machine, the sanitized version of this procedure looks like:
$ java --version openjdk 11.0.1 2018-10-16 LTS OpenJDK Runtime Environment Zulu11.2+3 (build 11.0.1+13-LTS) OpenJDK 64-Bit Server VM Zulu11.2+3 (build 11.0.1+13-LTS, mixed mode)
Checking JDK version on macOS
1. Command line (Terminal) procedures
Similar to #2 under the “Checking Java version on macOS” section above, this is a command line procedure, which in my example will use Mac Terminal. Here, it’s important to know that on recent versions of Java, the JDK is located at absolute path /Library/Java/JavaVirtualMachines/ . Armed with this information, we can simply open Terminal and list the contents of this directory on our machine to find the JDK version, as follows:
ls /Library/Java/JavaVirtualMachines
The only potential issue here would be if you had multiple JDK versions installed. In that case, I recommend that users check their $JAVA_HOME bash environmental variable from within Terminal to make a JDK determination, as follows:
$ echo $JAVA_HOME /Library/Java/JavaVirtualMachines/jdk1.8.0_101.jdk/Contents/Home
This, output on my machine, tells me that I am using JDK version 1.8.0_101. Done!
I hope this helps someone who quickly needs to find information on Mac about their Java install before making other software install or updating decisions!
Copyright © 2018 Justin C. Bagley
How to Check Java Version on Mac or Windows
Java runs many of the applications that we use daily. Many applications cannot run on older versions of Java. Hence, it is essential to know which version is installed on your system.
In this tutorial, learn how to check the Java version on your Mac or Windows system.
- A system running macOS or Windows
- Access to the command-line/terminal window
- A version of Java installed
Check Java Version on Mac
You can find the version of Java on macOS by:
- using the GUI (Mac’s System Preferences)
- prompting for the version in the terminal window
Option 1: Check Java Version on Mac Using the GUI
To check the Java version on Mac without using the terminal by searching for the Java Control Panel in the System Preferences.
1. Click the Apple icon in the menu bar to open the drop-down menu and navigate to System Preferences.
2. A new window opens with various icons and settings. Find and click the Java icon to open the Java Control Panel.
3. Once the Java Control Panel opens, click the About button. A new window with Java version information should appear.
Option 2: Check Java Version on Mac Using the Terminal
If you prefer using the terminal, checking the Java version is a simple one-command process.
1. First, open the terminal. To do so, click the Spotlight Search button in the top-right of the screen.
2. Type terminal in the search bar and open it by clicking on the icon in the search results.
3. Once in the command line, run the command: java -version . The output should display the Java version installed on your MacOS.
To check the version of the primary Java compiler – javac (pronounced “java-see”) use the command:
Note: If you have a Linux system, refer to How To Check Java Version Installed On Linux.
Check Java Version on Windows
To check the Java version on a Windows computer, you can use:
Option 1: Check Java Version on Windows Using GUI
To find the Java version on your Windows without opening a terminal window, use the Control Panel.
1. Open the Windows menu in the bottom-left corner and type control panel in the search bar.
2. Find the Control Panel in the search results and click the icon to open it.
3. Move to the Programs directory.
4. Find and click the Java icon to open the Java Control Panel.
5. Once the control panel opens, click the About button.
6. The About Java window should appear and display the Java version on your computer.
Option 2: Check Java Version on Windows Using Command Line
Another option to find the Java version on Windows is through the command line.
1. Open the Windows Start menu in the bottom-left corner and type cmd in the search bar.
2. Then, open the Command Prompt once it appears in the search results.
3. A new window with the command prompt should appear. In it, type the command java -version and hit Enter. The output should display the Java version installed on your Windows system.
You can also check the version of the Java’s primary compiler, javac, with the command:
This article showed you how to check the version of Java installed on a macOS or Windows system.
How to Check Java Version on a Mac
This article was co-authored by wikiHow staff writer, Travis Boylls. Travis Boylls is a Technology Writer and Editor for wikiHow. Travis has experience writing technology-related articles, providing software customer service, and in graphic design. He specializes in Windows, macOS, Android, iOS, and Linux platforms. He studied graphic design at Pikes Peak Community College.
The wikiHow Tech Team also followed the article’s instructions and verified that they work.
This article has been viewed 132,319 times.
This wikiHow will teach you how to check what version of Java you have installed on your Mac by checking the System Preferences, using the Java website, or by using your Mac’s Terminal.
Checking Your System Preferences
- If there is an update available, follow the instructions to update to the latest recommended version of Java. You can also check the box for «Check for Automatic Updates» so your version will always be updated to the latest versions when they are available.
Reviewing the Java Website
Go to java.com/en/download/installed.jsp in Safari. Type java.com/en/download/installed.jsp in the address bar and press ⏎ Return .
Click Verify Java Version . It’s a red button in the center of the page. This may prompt a pop-up window asking if you want to run Java on this page.
Click Run , to confirm. The website will detect what version of Java you are running and recommend an update if needed.
Getting Information from Your Terminal
. It’s the icon of a small black box with a white command prompt in the corner. This will open your Mac’s Terminal.
Type java -version and press ⏎ Return . This command will tell you what version of Java your Mac is currently running.
Expert Q&A
Tips
You Might Also Like
How to Set JAVA_HOME for JDK & JRE: A Step-by-Step Guide
Use Easy Windows CMD Commands to Check Your Java Version
How to Do Division in Java (Integer and Floating Point)
How to Compile and Run Java Programs Using Notepad++
Simple Steps to Type a Bunny with Your Keyboard
About This Article
This article was co-authored by wikiHow staff writer, Travis Boylls. Travis Boylls is a Technology Writer and Editor for wikiHow. Travis has experience writing technology-related articles, providing software customer service, and in graphic design. He specializes in Windows, macOS, Android, iOS, and Linux platforms. He studied graphic design at Pikes Peak Community College. This article has been viewed 132,319 times.
Is this article up to date?
Quizzes
You Might Also Like
How to Set JAVA_HOME for JDK & JRE: A Step-by-Step Guide
Use Easy Windows CMD Commands to Check Your Java Version
How to Do Division in Java (Integer and Floating Point)
How to Check Java Version
In today’s blog, we will be showing you how to check the Java version on Windows and macOS operating systems.
List of content you will read in this article:
Among all the programming languages, Java is considered to be the most commonly used language that has been adopted worldwide. There are numerous reasons why Java has gained popularity over other alternatives. There is no doubt that Java has been famous among all Fortune 500 companies and is widely recommended by developers. Its user-friendly and flexible nature makes it a go-to programming language for web developers and programmers.
The main reasons behind Java being popular is its fast speed, high-end security, and reliability. Along with such benefits, Java also offers private transmission, automatic memory management, and secure crucial information.
About Java
Introduced in the 1990s by James Gosling, Java is an object-oriented, robust, and secure programming language. The team started this Java project to develop a language suitable, especially for digital devices like set-top boxes, television, etc. At first, C++ was to be used in the Java project but was not considered for some reasons. Later, Gosling expanded C++ and led to another stage of a project Green, which was later renamed the ‘Greentalk’ project by Gosling and his team members. These project files had the file extension as .gt, which is later recognized as ‘OAK.’
The name ‘OAK’ was given to the project after an oak tree that was located outside Gosling’s office. But later on, the term ‘OAK’ was changed to Java. After various talks and brainstorming sessions, Gosling and his team come to multiple names- JAVA, DNA, SILK, BURY, etc. Still, they decided on JAVA after many discussions due to its uniqueness. This name (Java) comes up from a type of espresso bean. Gosling and his team members had come up with this name while having a cup of coffee near their office.
The main principles on which Java was built are- robust, portable, platform-independent, multi-thread, etc. In 1995, Java was recognized as one of the ten best products in Time magazine. Today, Java has been used in various fields like internet programming, mobile devices, games, etc. later, multiple versions of Java have been introduced over the years with new added features and functionalities.
Versions of Java
Over time, Java has introduced various versions with different and advanced features than the earlier version. Every version has fulfilled the drawback of their previous versions. Some of the versions are still supported, and some of them are not. Below is the list of all the Java versions introduced to date.
Support Until