summaryrefslogtreecommitdiffstats
path: root/extras/JavaVersion.java
blob: 5e4a4c735ee2d4c2ec3812c44f9fbdfcb68e2f01 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
/*
 * JavaVersion returns the version of java interpreter running it. Inspired by
 * "libraries/javacheck/JavaCheck.java" in PrismLauncher.
 */
public final class JavaVersion {
  public static void main(String[] args) {
    String p = System.getProperty("java.version");
    if (p != null)
      System.out.println(p);
    else
      System.exit(1);
  }
}