Determine JAVA Version in Windows From Command Line. We have different methods to determine Java or JRE version in windows. First way is running java command in command like with version information.We will also provide -version option like below. The Java Runtime Environment 64 bit (JRE) is what you get when you download software. The JRE consists of the Java Virtual Machine (JVM), Java platform core classes, and supporting Java platform libraries. The JRE is the runtime portion of the software, which is all you need to run it in your Web browser. What is Java Plug-in software? Java Standard Edition (SE) is a free software bundle that provides the Java Runtime Environment and the libraries and components you need to display a wide range of programs and Web content on 32. Sign in to Cloud. Access your cloud dashboard, manage orders, and more. Sign up for a free trial. Java software for your computer, or the Java Runtime Environment, is also referred to as the Java Runtime, Runtime Environment, Runtime, JRE, Java Virtual Machine, Virtual Machine, Java VM, JVM, VM, Java plug-in, Java plugin, Java add-on or Java download. Do a 'GitBash Here' in the jre/bin folder of the software you installed. Then use './java.exe -version' INSTEAD of 'java -version' to get the information on the software's copy rather than the copy referenced by your PATH environment variable. Get version in software installation:./java.exe -version.
Active2 months ago
There are 2 varieties of JRE available. Java VM: IBM vs Sun
Is there any way to know which JRE I am using through java script or some java issued command.
Community♦
noquerynoquery1,20511 gold badge1212 silver badges1616 bronze badges
10 Answers
FrankFrank
The following command will tell you a lot of information about your java version, including the vendor:
Works on Windows, Mac and Linux.
Ernesto IserErnesto Iser1,84622 gold badges99 silver badges1616 bronze badges
- open up your:
- command prompt if you're using windows
- terminal if you're using mac or linux
- type in:
- grab a cup of coffee and your done! you don't need to add the .exe to the java -version if everything is installed correctly
chaos_factionchaos_faction
In linux:
In windows:
If you need more info about the jvm you can call the executable with the parameter
-XshowSettings:properties
. It will show a lot of System Properties. These properties can also be accessed by means of the static method System.getProperty(String)
in a Java class. As example this is an excerpt of some of the properties that can be obteined:Java Jre Version 7
So if you need to access any of these properties from Java code you can use:
Take into account that sometimes the vendor is not exposes as clear as Oracle or IBM. For example
HotSpot is how Oracle calls their implementation of the JVM. Check this list if the vendor does not seem to be shown with
Francisco PugaFrancisco Puga-version
Is Java Jre Free
16.8k33 gold badges3535 silver badges4848 bronze badges
You can find out the currently running JVM's version from the System properties object; see the javadoc for
System.getProperties()
. The 'java.vm.vendor' property gives the JVM vendor name; e.g. (If you are executing in a sandbox, the security manager may prevent you from reading system properties. If that's the case, you are pretty much out of luck.)
Some JVMs report the version number if you use the
Stephen CStephen C-version
command line parameter, but that assumes that you can run commands, and that you know the name of / path to the java
command ... or the equivalent. (And that means there is a chicken and egg problem ...)550k7777 gold badges639639 silver badges979979 bronze badges
As you are expecting it to know using the JS, I believe you wanna know the JRE versioned being used in your browser. Hence you can include java version tester applet which can exactly tell you the version of current browser.
Amit Kumar GuptaAmit Kumar Gupta4,1391010 gold badges4949 silver badges7272 bronze badges
Open command prompt
To set Java home in windows:Right click on My computer->Properties->Advanced system settings->Environment Variable-> System Variable-> Newgive name as JAVA_HOMEvalues as(e.g.) c:programfilesjdk
Select path and click edit, keep in the beginning as:%JAVA_HOME%bin;...remaining settings goes here
TechFindTechFind2,1201616 gold badges4141 silver badges6161 bronze badges
The Java system property
System.getProperty(...)
to consult is 'java.runtime.name'
. This will distinguish between 'OpenJDK Runtime Environment' and 'Java(TM) SE Runtime Environment'. They both have the same vendor - 'Oracle Corporation'.This property is also included in the output for
OrangeDogOrangeDogjava -version
.23.4k88 gold badges7272 silver badges150150 bronze badges
I had a problem where my java applications quit work with no discernible that I could find. It turned out my system started using the 64bit version rather than the 32bit version was needed (windows server 2012). In windows, the command:
just brought me back to the command prompt with no information. It wasn't until I tried
that it gave me what was being executed was the 64bit version. It boiled down to my
SteveFergSteveFergPATH
environment variable finding the 64bit version first. 2,16155 gold badges1515 silver badges2626 bronze badges
GitBash+Windows10+Software that came bundled with it's own JRE copy:
Do a 'GitBash Here' in the jre/bin folder of the software you installed.Then use './java.exe -version' INSTEAD of 'java -version' to get theinformation on the software's copy rather than the copy referenced by your PATH environment variable.
Get version in software installation: ./java.exe -version
Get version in your PATH variable: java -version
As for addressing the original question and getting vendor information:
J.M.I. MADISONJ.M.I. MADISON