In this tutorial we will find out JDK (Java development kit) installed in your system using java program.
Program example - How to find out JDK (Java development kit) installed in your system/windows using java program >
We will use (System.getProperty("java.specification.version")) to find out JDK (Java development kit) installed in your system.
/** Find current JVM version */
public class FindCurrentJVMVersionExample {
public static void main(String[] args) {
String currentJDKVersion = System.getProperty("java.specification.version");
System.out.println("current JDK (Java development kit) on system = "+
currentJDKVersion);
}
}
/*OUTPUT
current JDK (Java development kit) on system = 1.8
*/
|
output shows 1.8 i.e. Java 8 is installed on my system.
output of program may vary on different systems.
Summary -
So in this tutorial we found out JDK (Java development kit) installed in your system using java program.
Having any doubt? or you you liked the tutorial! Please comment in below section.
Please express your love by liking JavaMadeSoEasy.com (JMSE) on facebook, following on google+ or Twitter.
RELATED LINKS>
Find out Java version (32 or 64 bit) installed in your system using java program and cmd
Find out JDK version installed in your system using java program
Find eclipse version in your system
Labels:
Core Java