Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.springframework.core
Class JdkVersion

    java.lang.Object
      org.springframework.core.JdkVersion

    public abstract class JdkVersion

extends Object

Internal helper class used to find the Java/JDK version that Spring is operating on, to allow for automatically adapting to the present platform's capabilities.

Note that Spring does not support 1.2 or earlier JVMs.

Author:
  Rod Johnson, Juergen Hoeller, Rick Evans

Field Summary
`static int` | `JAVA_13` Constant identifying the 1.3.x JVM (JDK 1.3).
`static int` | `JAVA_14` Constant identifying the 1.4.x JVM (J2SE 1.4).
`static int` | `JAVA_15` Constant identifying the 1.5 JVM (Java 5).
`static int` | `JAVA_16` Constant identifying the 1.6 JVM (Java 6).
`static int` | `JAVA_17` Constant identifying the 1.7 JVM (Java 7).

Constructor Summary
`JdkVersion()`

Method Summary
`static String` | `getJavaVersion()` Return the full Java version string, as returned by `System.getProperty("java.version")`.
`static int` | `getMajorJavaVersion()` Get the major version code.
`static boolean` | `isAtLeastJava14()` Convenience method to determine if the current JVM is at least Java 1.4.
`static boolean` | `isAtLeastJava15()` Convenience method to determine if the current JVM is at least Java 1.5 (Java 5).
`static boolean` | `isAtLeastJava16()` Convenience method to determine if the current JVM is at least Java 1.6 (Java ).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### JAVA_13

    public static final int JAVA_13

  Constant identifying the 1.3.x JVM (JDK 1.3).

  See Also:
    Constant Field Values

### JAVA_14

    public static final int JAVA_14

  Constant identifying the 1.4.x JVM (J2SE 1.4).

  See Also:
    Constant Field Values

### JAVA_15

    public static final int JAVA_15

  Constant identifying the 1.5 JVM (Java 5).

  See Also:
    Constant Field Values

### JAVA_16

    public static final int JAVA_16

  Constant identifying the 1.6 JVM (Java 6).

  See Also:
    Constant Field Values

### JAVA_17

    public static final int JAVA_17

  Constant identifying the 1.7 JVM (Java 7).

  See Also:
    Constant Field Values

Constructor Detail

### JdkVersion

    public JdkVersion()

Method Detail

### getJavaVersion

    public static String getJavaVersion()

  Return the full Java version string, as returned by `System.getProperty("java.version")`.

  Returns:
    the full Java version string
  See Also:
    `System.getProperty(String)`

### getMajorJavaVersion

    public static int getMajorJavaVersion()

  Get the major version code. This means we can do things like `if (getMajorJavaVersion() < JAVA_14)`.

  Returns:
    a code comparable to the JAVA_XX codes in this class
  See Also:
    `JAVA_13`, `JAVA_14`, `JAVA_15`, `JAVA_16`, `JAVA_17`

### isAtLeastJava14

    public static boolean isAtLeastJava14()

  Convenience method to determine if the current JVM is at least Java 1.4.

  Returns:
    `true` if the current JVM is at least Java 1.4
  See Also:
    `getMajorJavaVersion()`, `JAVA_14`, `JAVA_15`, `JAVA_16`, `JAVA_17`

### isAtLeastJava15

    public static boolean isAtLeastJava15()

  Convenience method to determine if the current JVM is at least Java 1.5 (Java 5).

  Returns:
    `true` if the current JVM is at least Java 1.5
  See Also:
    `getMajorJavaVersion()`, `JAVA_15`, `JAVA_16`, `JAVA_17`

### isAtLeastJava16

    public static boolean isAtLeastJava16()

  Convenience method to determine if the current JVM is at least Java 1.6 (Java ).

  Returns:
    `true` if the current JVM is at least Java 1.6
  See Also:
    `getMajorJavaVersion()`, `JAVA_16`, `JAVA_17`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| The Spring Framework
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2007 The Spring Framework.