org.springframework.core
Class JdkVersion

java.lang.Object
  extended byorg.springframework.core.JdkVersion

public class JdkVersion
extends java.lang.Object

Class used to find the current JVM version. Usually we want to find if we're in a 1.4 or higher JVM. (Spring does not support 1.2 JVMs.)

Version:
$Id: JdkVersion.java,v 1.2 2004/03/18 02:46:06 trisberg Exp $
Author:
Rod Johnson

Field Summary
static int JAVA_13
           
static int JAVA_14
           
static int JAVA_15
           
 
Constructor Summary
JdkVersion()
           
 
Method Summary
static int getMajorJavaVersion()
          Get the major version code.
 
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
See Also:
Constant Field Values

JAVA_14

public static final int JAVA_14
See Also:
Constant Field Values

JAVA_15

public static final int JAVA_15
See Also:
Constant Field Values
Constructor Detail

JdkVersion

public JdkVersion()
Method Detail

getMajorJavaVersion

public static int getMajorJavaVersion()
Get the major version code. This means we can do things like if getJavaVersion() >= JAVA_14

Returns:
a code comparable to the JAVA_XX codes in this class.


Copyright (C) 2003-2004 The Spring Framework Project.