Get Java specification version using System class in Java

Description

The following code shows how to get Java specification version using System class.

Example


/*from w  ww .j  a  v a 2  s .c om*/
public class Main {

  public static void main(String[] args) {
    System.out.println(System.getProperty("java.specification.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