Top Description Fields Constructors Methods
org.apache.derby.shared.common.info

public abstract Class JVMInfo

extends Object
Class Inheritance
Imports
java.lang.reflect.InvocationTargetException, .Method, java.net.MalformedURLException, org.apache.derby.shared.common.sanity.SanityManager

This class is used to determine which Java specification Derby will run at. For a useful discussion of how this class is used, please see DERBY-3176.

Field Summary

Modifier and TypeField and Description
private static final boolean
_isModuleAware

The JVM's runtime environment.

public static final int
public static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static String

Returns:

a string description of the virtual machine's version
derbyVMLevel
()

Return Derby's understanding of the virtual machine's environment.

public static final String

Returns:

the system module path (might be null)
getSystemModulePath
()

Get the JVM's system module path.

private static String
getSystemProperty(final String
name of the property
name
)

Get system property.

public static boolean

Returns:

true if JNDI is available
hasJNDI
()

Determine whether we are running in a constrained environment.

public static final boolean

Returns:

true if it is IBM jvm, false if it is not IBM jvm
isIBMJVM
()

Check whether this is IBM jvm.

public static final boolean

Returns:

true if it is IBM jvm, false if it is not IBM jvm
isModuleAware
()

Return true if the JVM uses a module path rather than a classpath.

public static final boolean

Returns:

true if it is sun jvm, false if it is not sun jvm
isSunJVM
()

Check whether this is sun jvm.

public static void
javaDump()

For IBM jvm, this method will dump more diagnostic information to file.

public static int
public static int
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_isModuleAwareback to summary
private static final boolean _isModuleAware

The JVM's runtime environment.

  • 1 - not used was JDK 1.1
  • 2 - not used, was for JDK 1.2 and 1.3
  • 4 - not used, was for JDK 1.4.0 or 1.4.1
  • 5 - not used, was for JDK 1.4.2
  • 6 - not used, was for JDK 1.5
  • 7 - not used, was for JDK 1.6
  • 8 - not used, was for JDK 1.7
  • 9 - J2SE_18 - JDK 1.8
J2SE_18back to summary
public static final int J2SE_18
JDK_IDback to summary
public static final int JDK_ID

Constructor Detail

JVMInfoback to summary
public JVMInfo()

Method Detail

derbyVMLevelback to summary
public static String derbyVMLevel()

Return Derby's understanding of the virtual machine's environment.

Returns:String

a string description of the virtual machine's version

getSystemModulePathback to summary
public static final String getSystemModulePath()

Get the JVM's system module path. Returns null if the JVM is not running with a module path.

Returns:String

the system module path (might be null)

getSystemPropertyback to summary
private static String getSystemProperty(final String name)

Get system property.

Parameters
name:String

name of the property

hasJNDIback to summary
public static boolean hasJNDI()

Determine whether we are running in a constrained environment.

Returns:boolean

true if JNDI is available

isIBMJVMback to summary
public static final boolean isIBMJVM()

Check whether this is IBM jvm.

Returns:boolean

true if it is IBM jvm, false if it is not IBM jvm

isModuleAwareback to summary
public static final boolean isModuleAware()

Return true if the JVM uses a module path rather than a classpath.

Returns:boolean

true if it is IBM jvm, false if it is not IBM jvm

isSunJVMback to summary
public static final boolean isSunJVM()

Check whether this is sun jvm.

Returns:boolean

true if it is sun jvm, false if it is not sun jvm

javaDumpback to summary
public static void javaDump()

For IBM jvm, this method will dump more diagnostic information to file. JVM specific code for other vender can be added. DERBY-4856

jdbcMajorVersionback to summary
public static int jdbcMajorVersion()
jdbcMinorVersionback to summary
public static int jdbcMinorVersion()