Get Java Runtime Environment (JRE) version in Java

Description

The following code shows how to get Java Runtime Environment (JRE) version.

Example


// ww  w .  ja  va 2  s .c  o m
public class Main {
  public static void main(String[] args) {
    String version = System.getProperty("java.version");

    System.out.println("JRE Version = " + version);
  }
}

The code above generates the following result.





















Home »
  Java Tutorial »
    Development »




Java Algorithms
Java Clipboard
Java Compiler
Java Desktop
Java Virtual Machine
Java Math
OS
Random
Java Robot
Java RuntimeMXBean
Java Timer
Java UUID
Java Internationalization