terp - the Codemesh Modular
Template Interpreter v1.3.304

com.codemesh.terp.data
Interface Jre

All Superinterfaces:
java.lang.Comparable<Jre>, Named, java.io.Serializable, Versioned
All Known Implementing Classes:
Jre.Impl

public interface Jre
extends java.lang.Comparable<Jre>, java.io.Serializable, Named, Versioned

An interface implemented by all Java Runtime Environment types.


Nested Class Summary
static class Jre.Impl
          An implementation of the Jre interface.
 
Field Summary
static java.lang.String DIR
           
static java.lang.String HOME_DIR
           
static java.lang.String MAKER
           
static java.lang.String VERSION
           
 
Method Summary
 java.io.File getDir()
          Returns the JRE's home directory.
 java.io.File getHomeDir()
          Returns the JRE's home directory.
 JavaExecutor getJava()
          Returns the java executor.
 Jdk getJdk()
          Returns the JRE's JDK or null if it does not belong to a JDK.
 java.io.File[] getJvmLibraries(java.lang.Object os, java.lang.Object pa)
          Returns an array of shared library representing the JVM's main modules.
 Path getJvmLibraryPath(java.io.File jvm)
          Returns a path suitable as a dynamic library (LD_LIBRARY_PATH) when running a JNI application with this JRE.
 java.lang.String getMaker()
          Returns a code for the maker of the JRE.
 java.util.Map<java.lang.String,java.lang.String> getProperties()
          Returns the properties defined for this runtime.
 java.lang.String getProperty(java.lang.String name)
          Returns the value of the requested Java runtime property.
 Path getSystemClassPath()
          Returns the system classpath of the JRE.
 Version getVersion()
          Returns the JRE's version.
 void setMaker(java.lang.String maker)
          Sets the JRE's maker code.
 
Methods inherited from interface java.lang.Comparable
compareTo
 
Methods inherited from interface com.codemesh.terp.api.Named
getName
 

Field Detail

DIR

static final java.lang.String DIR
See Also:
Constant Field Values

HOME_DIR

static final java.lang.String HOME_DIR
See Also:
Constant Field Values

MAKER

static final java.lang.String MAKER
See Also:
Constant Field Values

VERSION

static final java.lang.String VERSION
See Also:
Constant Field Values
Method Detail

getDir

java.io.File getDir()
Returns the JRE's home directory. This is an alias for getHomeDir().

Returns:
the home directory.

getHomeDir

java.io.File getHomeDir()
Returns the JRE's home directory. This is an alias for getDir().

Returns:
the home directory.

getSystemClassPath

Path getSystemClassPath()
Returns the system classpath of the JRE. The system classpath is the path that contains all the built-in Java types (e.g. java.lang.Object) that you don't have to specify on the application's classpath. By using a certain version of Java, these classes are automatically made available. Normally, the system classpath consists of a set of jar files in the JRE's lib directory.

Returns:
the built-in classpath of the JRE.
See Also:
Jdk.getToolsClassPath()

getVersion

Version getVersion()
Returns the JRE's version.

Specified by:
getVersion in interface Versioned
Returns:
the JRE's version.

getJdk

Jdk getJdk()
Returns the JRE's JDK or null if it does not belong to a JDK.

Returns:
a JDK to which the JRE belongs.

getJava

JavaExecutor getJava()
Returns the java executor.

Returns:
an executor for the Java executor associated with this JRE instance.

getProperties

java.util.Map<java.lang.String,java.lang.String> getProperties()
Returns the properties defined for this runtime.

Returns:
the runtime properties.

getProperty

java.lang.String getProperty(java.lang.String name)
Returns the value of the requested Java runtime property.

Parameters:
name - the property name.
Returns:
the requested property value.

setMaker

void setMaker(java.lang.String maker)
Sets the JRE's maker code.

Parameters:
maker - the maker code.
See Also:
for a list of supported codes.

getMaker

java.lang.String getMaker()
Returns a code for the maker of the JRE. Currently supported maker codes include: sun, ibm, oracle, and bea.

Returns:
the maker code.

getJvmLibraries

java.io.File[] getJvmLibraries(java.lang.Object os,
                               java.lang.Object pa)
Returns an array of shared library representing the JVM's main modules. Main modules are typically named jvm.dll or libjvm.so or some such name and they can be available in different flavors (server, client, etc.).

Parameters:
os - the operating system.
pa - the processor architecture.
Returns:
an array of files that might be empty if no such library can be found.

getJvmLibraryPath

Path getJvmLibraryPath(java.io.File jvm)
Returns a path suitable as a dynamic library (LD_LIBRARY_PATH) when running a JNI application with this JRE.

Parameters:
jvm - the JVM main module for which we want a path.
Returns:
a path that might be empty.

terp - the Codemesh Modular
Template Interpreter v1.3.304

Copyright © 2008-2012 by Codemesh, Inc. All Rights Reserved.