- How to check JDK version that installed on your computer
- 1. Where JDK is installed?
- Как проверить версию Java?
- Где находится Java на ПК
- Как узнать версию Java на компьютере
- Проверка на Windows
- Проверка на Mac
- Проверка на Linux
- Как проверить версию Java онлайн
- Проверка Java в браузере
- How to check which version of Java you have installed in Windows 10, in 2 steps
- Check out the products mentioned in this article:
- Windows 10 (From $139.99 at Best Buy)
- Lenovo IdeaPad 130 (From $299.99 at Best Buy)
- How to check which Java version you have in Windows 10
- How to Check Java Version on Mac or Windows
- PHP Code
- 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
- How to check Java version
- Related Topics:
- About the Author:
How to check JDK version that installed on your computer
The Java development kit (JDK) contains tools for Java development, and the Java Runtime Environment (JRE) contains a JVM to convert byte code .class to machine code, and execute it, in short, the JRE runs Java program.
Check JDK Version
We can use javac -version to find out the version of the installed JDK. In the below example, the JDK version is 11.0.7
Check JRE Version
We can use java -version to find out the version of the installed JRE. In the below example, the JRE version is 1.8.0_252
The JDK and JRE versions can be different on the same computer. Multiple JDK and JRE versions are allowed on the same computer; it is better to find out which version is configured in the system classpath to run or compile the Java program.
1. Where JDK is installed?
The JDK also contains a JRE to run the Java program.
1.1 On Ubuntu or Linux, we can use which javac to find out where JDK is installed.
In the above example, the JDK is installed at /usr/lib/jvm/adoptopenjdk-11-hotspot-amd64/ .
1.2 On Windows, we can use where javac to find out where JDK is installed.
Do I need JDK or JRE?
For end-users, they need to install JRE to run the Java program, and the JDK is for developers. For the production environment, the deployment team only need to install JRE to run the Java program. However, developers often request to install the JDK, instead of the standalone JRE on the production server, because the JDK contains JRE and also extra tools to monitor and debug the running Java program.
Как проверить версию Java?
Для работы приложений, программ и некоторых сайтов требуется Джава. Обновления и доработки утилиты заставляют пользователей загружать новые версии так часто, что за названиями и номерами уже не следят. Поэтому актуальна проверка Java, несколько способов которой узнаете далее.
Где находится Java на ПК
Чаще всего знать, где находится Java, требуется пользователям ОС Windows 10, 8, 7 и XP. На выбор предоставлено два варианта поиска.
Первый способ:
- Откройте меню «Пуск». Обладателям Windows 10 на этом шаге откроется список программ по алфавиту, в котором легко найти Джаву и развернуть меню.
- Для других версий ОС нажмите «Все программы».
- В появившемся списке найдете папку с приложением.
- Далее выбирайте иконку в зависимости от того, что нужно проверить.
Второй способ:
- Откройте меню «Пуск».
- Запустите «Панель управления».
- Найдите Джава.
- Откроется окно для управления утилитой.
Пользователям Mac OS, чтобы проверить Джава, стоит воспользоваться следующей инструкцией:
- Нажмите на значок Apple в углу экрана.
- Перейдите в «Системные настройки».
- Щелкните на значок Джавы.
Владельцам ПК с установленной ОС Linux требуется ввести в командную строку код readlink -f $(which java). Это поможет открыть директорию с утилитой.
Как узнать версию Java на компьютере
Проверить номер Джавы необходимо, когда стороннее приложение рекомендует использовать последнюю версию утилиты. Чтобы узнать, какая версия Java установлена, обратимся к инструкциям для интегрированных ОС.
Проверка на Windows
Узнать версию Java на компьютере с установленной ОС Windows можно двумя способами. Первый вариант проверить утилиту:
- Зайдите в панель управления Джавы по инструкции, изложенной выше.
- В первой вкладке выберите пункт About.
- В появившемся окне можно проверить номер приложения.
Быстрый способ: ввести код java –version в командную строку, которая вызывается нажатием комбинации горячих клавиш Win + R.
Второй вариант, как проверить Java на Windows 7, 8, 10:
- Зайдите в меню «Пуск».
- В поисковой строке наберите: «Установка и удаление программ».
- Сделайте одиночный клик по предложенному варианту с точным совпадением названия.
- Найдите Джава, чтобы проверить версию ПО.
Проверка на Mac
Для проверки версии программы Java на технике от Apple скачивается среда разработки JDK. Утилита активирует командную строку, в которой ведется работа.
Чтобы ответить на вопрос, как узнать версию ПО, достаточно проверить номер JDK. Для этого в командной строке вводится код java –version. Полученный ответ предоставляется в таком формате: «1.7.0_55».
Проверка на Linux
Пользователям Linux можно проверить версию утилиты тем же способом, что и владельцам компьютеров Apple. В командную строку вписывается java –version.
Если номер модификации ниже, чем 1.6, то не обойтись без дополнительной установки вспомогательного ПО через YaST.
Видео: Как узнать, какая версия Java установлена на компьютере с ОС Windows.
Как проверить версию Java онлайн
Это можно сделать через официальный сайт разработчиков. Для этого кликните по кнопке ниже или выполните инструкцию:
- На главной странице платформы найдите длинную гиперссылку, как на скриншоте.
- Нажмите кнопку для проверки.
- Итогом станет сообщение, содержащее строку с пометкой «Java version».
Если проверять онлайн, сайт сравнит новую программу с установленной и предложит загрузить обновление Джава на компьютер. Поэтому такой способ рациональнее, чем через «Панель управления».
Проверка Java в браузере
Чтобы проверить, включена ли Java в браузере, зайдите в его настройки. В разных обозревателях путь к Джаве отличается:
- Internet Explorer: «Сервис» – «Параметры обозревателя» – «Безопасность» – «Другой». Найти пункт о сценариях Джавы и выбрать «Включить».
- Mozilla Firefox: «Сервис» – «Дополнения» – «Плагины» – «Java». Остается убедиться, что модуль включен или стоит флажок на строке «Активировать всегда».
- Safari: «Параметры» – «Безопасность» – «Allow Plug-ins» – «Manage Website Settings». Выберите «Разрешить» в выпадающем списке на элементе Джава.
Для Chrome недоступно использование NPAPI, что исключает Джава из работы браузера. В Opera также не используется утилита.
How to check which version of Java you have installed in Windows 10, in 2 steps
Java is a programming language that’s used to install and run programs. Chances are that there are already several programs on your Windows computer that run using Java, even if you don’t know it.
However, if Windows isn’t running the latest version of Java, you may have trouble downloading new programs, or even opening some websites.
To check which version of Java you’re running, you’ll need to use Windows 10’s Command Prompt app. The Command Prompt can seem intimidating at first, but if you know what to type, you’ll be fine.
Here’s everything you need to know.
Check out the products mentioned in this article:
Windows 10 (From $139.99 at Best Buy)
Lenovo IdeaPad 130 (From $299.99 at Best Buy)
How to check which Java version you have in Windows 10
1. Type «Command Prompt» into the search bar next to your Start menu, and click on it when it appears in the search results.
2. Type «java -version» into the Command Prompt, then press Enter on your keyboard.
After a moment, your screen should display the information your computer has about Java, including what version you have installed.
If nothing displays, it most likely means that you don’t have Java installed on your computer at all. Luckily, you can download it for free here.
How to Check Java Version on Mac or Windows
PHP Code
- Home
- SysAdmin
- How to Check Java Version on Mac or Windows
Introduction
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.
Prerequisites
- 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.
How to check Java version
If you have OracleJDK installed on your computer, simply click menu Start, type about java into the search area, then click the About Java icon in the result. You can see the current version of Java in the following dialog:
Or you can go to Control Panel, switch to Large icons view and click the Java logo:
Then in the Java Control Panel dialog, click About button as shown in the following screenshot:
The second way (more familiar with programmers) to check Java version is opening a command prompt and type the following command:
Here, the version of Java is 1.8.0, and 201 is the update number. Each version can have several update numbers — the higher the more recent it is.
Note that “Java(TM) SE Runtime Environment” meaning that you’re using Oracle JDK. In case you’re using OpenJDK, the output should be:
If JDK/JRE is not installed or somehow the PATH environment variable is not updated for Java, you can see the following message:
Note that there can be multiple installations of JRE and/or JDK on a computer. In that case, the version of Java you see in the console is of the first JRE/JDK found in the list of environment variables.
To check the version exactly, you need to go to the bin directory of a JDK/JRE installation, for example:
And type the java –version command.
Related Topics:
About the Author:
Nam Ha Minh is certified Java programmer (SCJP and SCWCD). He started programming with Java in the time of Java 1.4 and has been falling in love with Java since then. Make friend with him on Facebook and watch his Java videos you YouTube.