Как узнать версию java на windows 10
Перейти к содержимому

Как узнать версию java на windows 10

  • автор:

Как узнать, какая версия Java установлена на Windows 10?

Работоспособность программ, установленных на ПК с Windows 10, зависит от множества компонентов, а именно: библиотек C++, Net Framework, а также Java. Данная платформа нужна для запуска и работы плееров, браузеров, небольших плагинов и т д. Однако как посмотреть версию Java в Windows 10, чтобы знать об актуальности установленного компонента.

Проверка версии Java на Windows 10 через командную строку

Для того, чтобы узнать установленную версию Java на Windows 10 через системную консоль, стоит запустить командную строку с правами Администратора и ввести такую команду:

Проверка версии Java через поисковик Windows 10

Если работать с командной строкой вам сложно или неудобно, тогда стоит нажать на кнопке «Пуск» и в поисковую строку ввести «About Java».

Далее выбираем «Open» или «Открыть» и в новом окне смотрим информацию об установленной версии Java.

В случае, если пункта «About Java» в поисковой выдаче нет, стоит попробовать ввести команду «Configure Java», а после нажать на кнопку «About».

Если же вы не можете посмотреть данные об установленной версии Java, то возможно, данный компонент поврежден или не установлен. В данном случае стоит перейти на официальный сайт Oracle и загрузить последнюю актуальную версию Java.

What Java Version Are You Running?

Frank Delporte

From time to time, you need to check which Java version is installed on your computer or server, for instance when starting on a new project or configuring an application to run on a server.

But did you know there are multiple ways you can do this and even get much more information than you might think, very quickly?

Reading the Java Version in the Terminal

Probably the easiest way to find the installed version is by using the java -version terminal command:

Checking Version Files in the Installation Directory

The above output results from info read by the java executable from a file inside its installation directory.

Let’s explore what we can find there.

On my machine, as I use SDKMAN to switch between different Java versions, all my versions are stored here:

And in each of these directories a release file can be found which also shows us the version information, including some extra information.

Getting More Information With showSettings

In 2010, an experimental flag (indicated with the X ) was added to OpenJDK to provide more configuration information: -XshowSettings .

This flag can be called with different arguments, each producing an other information output.

The cleanest way to call this flag, is by adding -version , otherwise you will get the long Java manual output as no application code was found to be executed.

Reading the System Properties

By using the -XshowSettings:properties flag, a long list of various properties is shown.

If you ever faced the problem of an unsupported Java version 59 (are similar), you’ll now also understand where this value is defined, it’s right here in this list as java.class.version .

It’s an internal number used by Java to define the version.

  • Java release > Class version
  • 8 > 52
  • 9 > 53
  • 10 > 54
  • 11 > 55
  • 12 > 56
  • 13 > 57
  • 14 > 58
  • 15 > 59
  • 16 > 60
  • 17 > 61
  • 18 > 62
  • 19 > 63

Reading the Locale Information

In case you didn’t know yet, I live in Belgium and use English as my computer language, as you can see when using the -XshowSettings:locale flag:

Reading the VM Settings

With the -XshowSettings:vm flag, some info is shown about the Java Virtual Machine.

As you can see in the second example, the amount of maximum heap memory size can be defined with the -Xmx flag.

Reading all at Once

If you want all of the information above with one call, use the -XshowSettings:all flag.

Conclusion

Next to java -version , we can also use java -XshowSettings:all -version to get more info about our Java environment.

How to Check Your Java Version in Windows & Mac

Doug Bonderud

Java remains the second-most popular coding language in the world according to the PYPL Index, and it ranks third among skilled professionals to develop high-performance applications across multiple platforms — only C and Python score higher.

web developer and his cat checking java version

As a result, you’ll often find Java running in the background of many Mac or Windows systems. However, if the version of Java you have isn’t up to date, applications may not work as intended — or may refuse to open at all.

In this piece, we’ll walk you through how to check your Java version in Mac and Windows to make sure the Java you’ve got is the one you need.

How to know the jdk version on my machine?

Mayank Kataria's user avatar

you might need to add path in environment variables which you can find in Control Panel open the Jdk where you installed and add until /bin in the path in environment variables.

Add until /bin in path variable in System Variables which is residing in Environment Variables.

Then do java -version which might show up.

If still problem persists, try restarting your pc and see.

Valentyn Hruzytskyi's user avatar

You need to update your Windows path to include your %JAVA_HOME%\bin directory. %JAVA_HOME% is the directory that you installed Java into and is also an environment variable that you need to configure for command line execution of your applications. You can edit both of these in the Windows control panel and you should restart.

When you run java -version you will see the internal version number. This is explained here: https://en.wikipedia.org/wiki/Java_version_history.

Basically, you can ignore the 1. when reading version number. The _xxx is a reference to the most recent patch or build release.

tarik's user avatar

On Windows 10, this required mapping the environment variable for JAVA_HOME to the JDK installation directory. Use these steps:

windows key -> Environment Variables , select the only result

In the System Properties window that opened, select Environment Variables enter image description here

Select new button under the User variables section

Variable name: JAVA_HOME , Variable Value: <The JDK filepath from step 0>

ok all open menus

Close any open cmd prompt windows

open a new cmd window and type echo %JAVA_HOME% It should print the installation path for the JDK.

To get your jdk location in Windows, run this at a command prompt:

This lists any and all locations of java.exe, including from your JAVA_HOME. For example, the 3rd line here reflects my JAVA_HOME location, where I’m pointing to JDK 8:

Note for comparison that java -version does not reflect my JAVA_HOME location and in fact shows java version 11 instead of 8:

This is confusing because my Java compiles (e.g., via mvn) use JDK 8 since that’s what my JAVA_HOME is pointing to. (I’m not even sure where the version 11 it found came from; possibly from when I installed maven.)

Determining the difference between the JRE and JDK you’re running has never been straightforward. Seems like java -version used to be a way to do this, but no longer.

Adding to the complexity, you can also supposedly get your Java version info from Control Panel > Programs > Java > About. For me, that shows Version 8. That’s despite java -version showing version 11.0.15. And it doesn’t change even if I point my JAVA_HOME to JDK 11.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *