Class ExecutionEnvironmentDescription

java.lang.Object
org.eclipse.jdt.launching.environments.ExecutionEnvironmentDescription

public final class ExecutionEnvironmentDescription extends Object
Helper class to parse and retrieve properties from execution environment description files. An execution environment description file can be used to define attributes relevant the launching of a specific JRE configuration. The format of the file is defined by http://wiki.eclipse.org/Execution_Environment_Descriptions.
Since:
3.5
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Additional directories property name in an execution environment description file.
    static final String
    Boot class path property name in an execution environment description file.
    static final String
    OSGi profile property name in an execution environment description file.
    static final String
    Debug arguments property name in an execution environment description file.
    static final String
    The directory containing the execution environment description file.
    static final String
    VM name property name in an execution environment description file.
    static final String
    Endorsed directories property name in an execution environment description file.
    static final String
    Executable property name in an execution environment description file.
    static final String
    Console executable property name in an execution environment description file.
    static final String
    Extension directories property name in an execution environment description file.
    static final String
    Pre-built index location property in an execution environment description file.
    static final String
    Java home property name in an execution environment description file.
    static final String
    Javadoc location property name in an execution environment description file.
    static final String
    Language level property name in an execution environment description file.
    static final String
    Source archive property name in an execution environment description file.
    static final String
    Source map property name in an execution environment description file.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates an execution environment description based on the properties defined in the given execution environment description file.
    Creates an execution environment description based on the given execution environment description properties.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the console executable for this description as a file or null if not specified.
    Returns the executable for this description as a file or null if not specified.
    Returns the location of the system libraries defined in this execution environment.
    Returns a map of properties defined in this execution environment description.
    getProperty(String property)
    Returns the specified property from this description, or null if none.
    Returns VM arguments in this description or null if none.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • ENDORSED_DIRS

      public static final String ENDORSED_DIRS
      Endorsed directories property name in an execution environment description file.
      See Also:
    • BOOT_CLASS_PATH

      public static final String BOOT_CLASS_PATH
      Boot class path property name in an execution environment description file.
      See Also:
    • SOURCE_DEFAULT

      public static final String SOURCE_DEFAULT
      Source archive property name in an execution environment description file. Value is a path. When present, the source attachment for each library in the boot class path will be the file specified by this property.
      See Also:
    • SOURCE_MAP

      public static final String SOURCE_MAP
      Source map property name in an execution environment description file.

      Maps class libraries to source attachments. Value is one or more entries of the form libPath=sourcePath separated by platform specific file separator. The paths can use {$ee.home} and '..' as well as the wild card characters '?" (any one character) and '*' (any number of characters). The sourcePath can use the wild card characters to have the source path be based on the wild card replacement in the libPath. In this case the wild card characters in the sourcePath must exist in the same order as the libPath. For example, lib/foo*.???=source/src*foo.???.

      See Also:
    • JAVADOC_LOC

      public static final String JAVADOC_LOC
      Javadoc location property name in an execution environment description file.

      Specifies javadoc location for class libraries. Must be a URL. You can use ${ee.home} and '..' segments to specify a file location relative to the ee file. If this property is not specified in the file, javadoc locations will be set to a default location based on the language level.

      See Also:
    • INDEX_LOC

      public static final String INDEX_LOC
      Pre-built index location property in an execution environment description file.

      Specifies the location for a pre-built search index. Must be a valid URL. You can use ${ee.home} and '..' segments to specify a file location relative to the ee file. If this property is not specified the default value of null will be used.

      Since:
      3.7
      See Also:
    • ADDITIONAL_DIRS

      public static final String ADDITIONAL_DIRS
      Additional directories property name in an execution environment description file.
      See Also:
    • EXTENSION_DIRS

      public static final String EXTENSION_DIRS
      Extension directories property name in an execution environment description file.
      See Also:
    • LANGUAGE_LEVEL

      public static final String LANGUAGE_LEVEL
      Language level property name in an execution environment description file. For example, 1.4 or 1.5.
      See Also:
    • CLASS_LIB_LEVEL

      public static final String CLASS_LIB_LEVEL
      OSGi profile property name in an execution environment description file.

      The value is the identifier of an OSGi profile, such as J2SE-1.4.

      See Also:
    • EXECUTABLE

      public static final String EXECUTABLE
      Executable property name in an execution environment description file. For example, javaw.exe.
      See Also:
    • EXECUTABLE_CONSOLE

      public static final String EXECUTABLE_CONSOLE
      Console executable property name in an execution environment description file. For example, java.exe.
      See Also:
    • JAVA_HOME

      public static final String JAVA_HOME
      Java home property name in an execution environment description file.

      The root install directory of the runtime environment or development kit. Corresponds to a value that could be used for JAVA_HOME environment variable

      See Also:
    • DEBUG_ARGS

      public static final String DEBUG_ARGS
      Debug arguments property name in an execution environment description file.

      The arguments to use to launch the VM in debug mode. For example "-agentlib:jdwp=transport=dt_socket,suspend=y,address=localhost:${port}". The ${port} variable will be substituted with a free port at launch time. When unspecified, default arguments are constructed based on the language level of the VM.

      See Also:
    • EE_NAME

      public static final String EE_NAME
      VM name property name in an execution environment description file.

      The name is used as the JRE name when installing an EE JRE into Eclipse.

      See Also:
    • EE_HOME

      public static final String EE_HOME
      The directory containing the execution environment description file. Relative paths are resolved relative to this location. This property will be set if not present, it does not need to be specified in the file.
      See Also:
  • Constructor Details

    • ExecutionEnvironmentDescription

      public ExecutionEnvironmentDescription(File eeFile) throws org.eclipse.core.runtime.CoreException
      Creates an execution environment description based on the properties defined in the given execution environment description file. The format of the file is defined by https://wiki.eclipse.org/Execution_Environment_Descriptions.
      Parameters:
      eeFile - execution environment description file
      Throws:
      org.eclipse.core.runtime.CoreException - if unable to read or parse the file
    • ExecutionEnvironmentDescription

      public ExecutionEnvironmentDescription(Map<String,String> eeProperties)
      Creates an execution environment description based on the given execution environment description properties. The contained properties are defined in https://wiki.eclipse.org/Execution_Environment_Descriptions.
      Parameters:
      eeProperties - execution environment description properties
      Since:
      3.21
  • Method Details

    • getProperties

      public Map<String,String> getProperties()
      Returns a map of properties defined in this execution environment description. Properties in the file that do not have a value assigned to them are returned in the keys with an empty string as the value. Variable substitutions for ${ee.home} have already been performed when resolving property values.
      Returns:
      properties as a map of String keys and values
    • getProperty

      public String getProperty(String property)
      Returns the specified property from this description, or null if none.
      Parameters:
      property - property name
      Returns:
      property value or null
    • getLibraryLocations

      public LibraryLocation[] getLibraryLocations()
      Returns the location of the system libraries defined in this execution environment. Libraries are generated from the endorsed directories, boot class path, additional directories, and extension directories specified by this description and are returned in that order. Source attachments are configured based on src and src.map properties.
      Returns:
      library locations, possibly empty
    • getVMArguments

      public String getVMArguments()
      Returns VM arguments in this description or null if none. VM arguments correspond to all properties in this description that do not begin with "-Dee." concatenated together with spaces. Any single VM argument that contains spaces itself is surrounded with quotes.
      Returns:
      VM arguments or null if none
    • getExecutable

      public File getExecutable()
      Returns the executable for this description as a file or null if not specified.
      Returns:
      standard (non-console) executable or null if none
    • getConsoleExecutable

      public File getConsoleExecutable()
      Returns the console executable for this description as a file or null if not specified.
      Returns:
      console executable or null if none