Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to know java or java run time version on a computer

Tags:

java

jvm

java-8

I have just started learning basics of java for my ultimate goal to learn Android. So I installed latest version of java from here. In .Net world I've used commands like ClrVer to know what all CLR versions are currently installed on the current machine.

I'm on Windows 7 and I checked my control panel to see the installation which happened. It shows the installer version to be8.0.1010.13 as shown in the snapshot below:

enter image description here

But that way I got bit more confused as I'm not sure if Java version, JRE version, Java Virtual Machine (JVM) version , Java Development Kit (JDK) version and the installer version (shown in the control panel snapshot above) would be same or different by any chance.

Is there any setting, registry, file properties or command with the help of which I can get to know the exact or complete version of java which got installed?

Also in .Net world the version of Language (e.g. C#), Run time (CLR) and .Net framework are completely independent and they might not be same at any given point of time. Is that exactly the same in Java world as well? Is it a single unified version per release which describes them all?

like image 991
RBT Avatar asked Jan 24 '26 06:01

RBT


1 Answers

In addition to using java -version to get the runtime, you could also use java.version (a system property) to get it. Something like,

System.out.println(System.getProperty("java.version"));
like image 135
Elliott Frisch Avatar answered Jan 26 '26 18:01

Elliott Frisch



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!