Java Doc for JavaRuntime.java in  » IDE-Eclipse » jdt » org » eclipse » jdt » launching » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » IDE Eclipse » jdt » org.eclipse.jdt.launching 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.eclipse.jdt.launching.JavaRuntime

JavaRuntime
final public class JavaRuntime (Code)
The central access point for launching support. This class manages the registered VM types contributed through the "org.eclipse.jdt.launching.vmType" extension point. As well, this class provides VM install change notification, and computes class paths and source lookup paths for launch configurations.

This class provides static methods only; it is not intended to be instantiated or sub-classed by clients.



Field Summary
final public static  StringATTR_CMDLINE
     Attribute key for a process property.
final public static  StringCLASSPATH_ATTR_LIBRARY_PATH_ENTRY
     Attribute key for a classpath attribute referencing a list of shared libraries that should appear on the -Djava.library.path system property.

The factory methods newLibraryPathsAttribute(String[]) and getLibraryPaths(IClasspathAttribute) should be used to encode and decode the attribute value.

final public static  intDEF_CONNECT_TIMEOUT
     Default launch/connect timeout (ms).
final public static  intERR_UNABLE_TO_RESOLVE_JRE
     A status code indicating that a JRE could not be resolved for a project. When a JRE cannot be resolved for a project by this plug-in's container initializer, an exception is thrown with this status code.
final public static  StringEXTENSION_POINT_EXECUTION_ENVIRONMENTS
     Simple identifier constant (value "executionEnvironments") for the execution environments extension point.
final public static  StringEXTENSION_POINT_RUNTIME_CLASSPATH_ENTRY_RESOLVERS
     Simple identifier constant (value "runtimeClasspathEntryResolvers") for the runtime classpath entry resolvers extension point.
final public static  StringEXTENSION_POINT_RUNTIME_CLASSPATH_PROVIDERS
     Simple identifier constant (value "classpathProviders") for the runtime classpath providers extension point.
final public static  StringEXTENSION_POINT_VM_INSTALLS
     Simple identifier constant (value "vmInstalls") for the VM installs extension point.
final public static  StringJRELIB_VARIABLE
     Classpath variable name used for the default JRE's library (value "JRE_LIB").
final public static  StringJRESRCROOT_VARIABLE
     Classpath variable name used for the default JRE's library source root (value "JRE_SRCROOT").
final public static  StringJRESRC_VARIABLE
     Classpath variable name used for the default JRE's library source (value "JRE_SRC").
final public static  StringJRE_CONTAINER
     Classpath container used for a project's JRE (value "org.eclipse.jdt.launching.JRE_CONTAINER").
final public static  StringPREF_CONNECT_TIMEOUT
     Preference key for launch/connect timeout.
final public static  StringPREF_VM_XML
     Preference key for the String of XML that defines all installed VMs.


Method Summary
public static  voidaddContainerResolver(IRuntimeClasspathEntryResolver resolver, String containerIdentifier)
     Registers the given resolver for the specified container.
public static  voidaddVMInstallChangedListener(IVMInstallChangedListener listener)
     Adds the given listener to the list of registered VM install changed listeners.
public static  voidaddVariableResolver(IRuntimeClasspathEntryResolver resolver, String variableName)
     Registers the given resolver for the specified variable.
public static  String[]computeDefaultRuntimeClassPath(IJavaProject jproject)
     Computes the default application classpath entries for the given project.
Parameters:
  jproject - The project to compute the classpath for The computed classpath.
public static  IRuntimeClasspathEntrycomputeJREEntry(ILaunchConfiguration configuration)
     Returns a runtime classpath entry identifying the JRE to use when launching the specified configuration or null if none is specified.
public static  IRuntimeClasspathEntrycomputeJREEntry(IJavaProject project)
     Returns a runtime classpath entry identifying the JRE referenced by the specified project, or null if none.
public static  String[]computeJavaLibraryPath(IJavaProject project, boolean requiredProjects)
     Returns a collection of paths that should be appended to the given project's java.library.path system property when launched.
public static  IRuntimeClasspathEntry[]computeUnresolvedRuntimeClasspath(IJavaProject project)
     Computes and returns the default unresolved runtime classpath for the given project.
public static  IRuntimeClasspathEntry[]computeUnresolvedRuntimeClasspath(ILaunchConfiguration configuration)
     Computes and returns the unresolved class path for the given launch configuration.
public static  IRuntimeClasspathEntry[]computeUnresolvedSourceLookupPath(ILaunchConfiguration configuration)
     Computes and returns the unresolved source lookup path for the given launch configuration.
public static  IVMInstallcomputeVMInstall(ILaunchConfiguration configuration)
     Returns the VM install for the given launch configuration.
public static  voidfireVMAdded(IVMInstall vm)
    
public static  voidfireVMChanged(PropertyChangeEvent event)
     Notifies all VM install changed listeners of the given property change.
public static  voidfireVMRemoved(IVMInstall vm)
    
public static  IRuntimeClasspathProvidergetClasspathProvider(ILaunchConfiguration configuration)
     Returns the classpath provider for the given launch configuration.
public static  StringgetCompositeIdFromVM(IVMInstall vm)
     Returns a String that uniquely identifies the specified VM across all VM types.
public static  IClasspathEntrygetDefaultJREContainerEntry()
     Creates and returns a classpath entry describing the default JRE container entry.
public static  IVMConnectorgetDefaultVMConnector()
     Return the default VM connector.
public static  IVMInstallgetDefaultVMInstall()
     Return the default VM set with setDefaultVM(). Returns the default VM.
public static  StringgetExecutionEnvironmentId(IPath jreContainerPath)
     Returns the execution environment identifier in the following JRE classpath container path, or null if none.
public static  IExecutionEnvironmentsManagergetExecutionEnvironmentsManager()
     Returns the execution environments manager.
public static  IClasspathEntrygetJREVariableEntry()
     Creates and returns a classpath entry describing the JRE_LIB classpath variable.
public static  IJavaProjectgetJavaProject(ILaunchConfiguration configuration)
     Return the IJavaProject referenced in the specified configuration or null if none.
public static  LibraryLocation[]getLibraryLocations(IVMInstall vm)
     Evaluates library locations for a IVMInstall.
public static  String[]getLibraryPaths(IClasspathAttribute attribute)
     Returns an array of strings referencing shared libraries that should appear on the -Djava.library.path system property at runtime for an associated IClasspathEntry , or null if the given attribute is not a CLASSPATH_ATTR_LIBRARY_PATH_ENTRY. Each string is used to create an IPath using the constructor Path(String), and may contain IStringVariable's.
public static  PreferencesgetPreferences()
     Returns the preference store for the launching plug-in.
public static  StringgetProjectOutputDirectory(ILaunchConfiguration config)
     Return the String representation of the default output directory of the launch config's project or null if there is no config, no project or some sort of problem.
public static  ISourceContainer[]getSourceContainers(IRuntimeClasspathEntry[] entries)
     Returns a collection of source containers corresponding to the given resolved runtime classpath entries.
public static  IRuntimeClasspathProvidergetSourceLookupPathProvider(ILaunchConfiguration configuration)
     Returns the source lookup path provider for the given launch configuration.
public static  IVMConnectorgetVMConnector(String id)
     Returns the VM connector defined with the specified identifier, or null if none.
public static  IVMConnector[]getVMConnectors()
     Returns all VM connector extensions.
public static  IVMInstallgetVMFromCompositeId(String idString)
     Return the VM corresponding to the specified composite Id.
public static  IVMInstallgetVMInstall(IJavaProject project)
     Returns the VM assigned to build the given Java project. The project must exist.
public static  IVMInstallgetVMInstall(IPath jreContainerPath)
     Returns the JRE referenced by the specified JRE classpath container path or null if none.
public static  StringgetVMInstallName(IPath jreContainerPath)
     Returns the name of the VM install referenced by the given JRE classpath container path, or null if none.
public static  IVMInstallTypegetVMInstallType(String id)
     Returns the VM install type with the given unique id.
public static  StringgetVMInstallTypeId(IPath jreContainerPath)
     Returns the identifier of the VM install type referenced by the given JRE classpath container path, or null if none.
public static  IVMInstallType[]getVMInstallTypes()
     Returns the list of registered VM types.
public static  booleanisContributedVMInstall(String id)
     Returns whether the VM install with the specified id was contributed via the vmInstalls extension point.
public static  booleanisVMInstallReference(IRuntimeClasspathEntry entry)
     Returns whether the given runtime classpath entry refers to a vm install.
public static  IRuntimeClasspathEntrynewArchiveRuntimeClasspathEntry(IResource resource)
     Returns a new runtime classpath entry for the given archive.
public static  IRuntimeClasspathEntrynewArchiveRuntimeClasspathEntry(IPath path)
     Returns a new runtime classpath entry for the given archive (possibly external).
public static  IPathnewDefaultJREContainerPath()
     Returns a path for the JRE classpath container identifying the default VM install.
public static  IRuntimeClasspathEntrynewDefaultProjectClasspathEntry(IJavaProject project)
     Returns a new runtime classpath entry containing the default classpath for the specified Java project.
public static  IPathnewJREContainerPath(IVMInstall vm)
     Returns a path for the JRE classpath container identifying the specified VM install by type and name.
public static  IPathnewJREContainerPath(String typeId, String name)
     Returns a path for the JRE classpath container identifying the specified VM install by type and name.
public static  IPathnewJREContainerPath(IExecutionEnvironment environment)
     Returns a path for the JRE classpath container identifying the specified execution environment.
public static  IClasspathAttributenewLibraryPathsAttribute(String[] paths)
     Creates a new classpath attribute referencing a list of shared libraries that should appear on the -Djava.library.path system property at runtime for an associated IClasspathEntry .

The factory methods newLibraryPathsAttribute(String[]) and getLibraryPaths(IClasspathAttribute) should be used to encode and decode the attribute value.


Parameters:
  paths - an array of strings representing paths of shared libraries.Each string is used to create an IPath using the constructorPath(String), and may contain IStringVariable's.Variable substitution is performed on each string before a path is constructedfrom a string.
public static  IRuntimeClasspathEntrynewProjectRuntimeClasspathEntry(IJavaProject project)
     Returns a new runtime classpath entry for the given project.
public static  IRuntimeClasspathEntrynewRuntimeClasspathEntry(String memento)
     Returns a runtime classpath entry constructed from the given memento.
public static  IRuntimeClasspathEntrynewRuntimeContainerClasspathEntry(IPath path, int classpathProperty)
     Returns a runtime classpath entry for the given container path with the given classpath property.
public static  IRuntimeClasspathEntrynewRuntimeContainerClasspathEntry(IPath path, int classpathProperty, IJavaProject project)
     Returns a runtime classpath entry for the given container path with the given classpath property to be resolved in the context of the given Java project.
public static  IRuntimeClasspathEntrynewStringVariableClasspathEntry(String expression)
     Returns a new runtime classpath entry for the given expression that may contain string substitution variable references.
public static  IRuntimeClasspathEntrynewVariableRuntimeClasspathEntry(IPath path)
     Returns a new runtime classpath entry for the classpath variable with the given path.
public static  voidremoveVMInstallChangedListener(IVMInstallChangedListener listener)
     Removes the given listener from the list of registered VM install changed listeners.
public static  IRuntimeClasspathEntry[]resolveRuntimeClasspath(IRuntimeClasspathEntry[] entries, ILaunchConfiguration configuration)
     Resolves the given classpath, returning the resolved classpath in the context of the given launch configuration.
public static  IRuntimeClasspathEntry[]resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry, ILaunchConfiguration configuration)
     Returns resolved entries for the given entry in the context of the given launch configuration.
public static  IRuntimeClasspathEntry[]resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry, IJavaProject project)
     Returns resolved entries for the given entry in the context of the given Java project.
public static  IRuntimeClasspathEntry[]resolveSourceLookupPath(IRuntimeClasspathEntry[] entries, ILaunchConfiguration configuration)
     Resolves the given source lookup path, returning the resolved source lookup path in the context of the given launch configuration.
public static  voidsavePreferences()
     Saves the preferences for the launching plug-in.
public static  voidsaveVMConfiguration()
     Saves the VM configuration information to the preferences.
public static  voidsetDefaultVMConnector(IVMConnector connector, IProgressMonitor monitor)
     Sets a VM connector as the system-wide default VM.
public static  voidsetDefaultVMInstall(IVMInstall vm, IProgressMonitor monitor)
     Sets a VM as the system-wide default VM, and notifies registered VM install change listeners of the change.
Parameters:
  vm - The vm to make the default.
public static  voidsetDefaultVMInstall(IVMInstall vm, IProgressMonitor monitor, boolean savePreference)
     Sets a VM as the system-wide default VM, and notifies registered VM install change listeners of the change.
Parameters:
  vm - The vm to make the default.

Field Detail
ATTR_CMDLINE
final public static String ATTR_CMDLINE(Code)
Attribute key for a process property. The class org.eclipse.debug.core.model.IProcess allows attaching String properties to processes. The value of this attribute is the command line a process was launched with. Implementers of IVMRunner should use this attribute key to attach the command lines to the processes they create.



CLASSPATH_ATTR_LIBRARY_PATH_ENTRY
final public static String CLASSPATH_ATTR_LIBRARY_PATH_ENTRY(Code)
Attribute key for a classpath attribute referencing a list of shared libraries that should appear on the -Djava.library.path system property.

The factory methods newLibraryPathsAttribute(String[]) and getLibraryPaths(IClasspathAttribute) should be used to encode and decode the attribute value.

Each string is used to create an IPath using the constructor Path(String), and may contain IStringVariable's. Variable substitution is performed on the string prior to constructing a path from the string. If the resulting IPath is a relative path, it is interpreted as relative to the workspace location. If the path is absolute, it is interpreted as an absolute path in the local file system.


since:
   3.1
See Also:   org.eclipse.jdt.core.IClasspathAttribute



DEF_CONNECT_TIMEOUT
final public static int DEF_CONNECT_TIMEOUT(Code)
Default launch/connect timeout (ms).
since:
   2.0



ERR_UNABLE_TO_RESOLVE_JRE
final public static int ERR_UNABLE_TO_RESOLVE_JRE(Code)
A status code indicating that a JRE could not be resolved for a project. When a JRE cannot be resolved for a project by this plug-in's container initializer, an exception is thrown with this status code. A status handler may be registered for this status code. The source object provided to the status handler is the Java project for which the path could not be resolved. The status handler must return an IVMInstall or null. The container resolver will re-set the project's classpath if required.
since:
   2.0



EXTENSION_POINT_EXECUTION_ENVIRONMENTS
final public static String EXTENSION_POINT_EXECUTION_ENVIRONMENTS(Code)
Simple identifier constant (value "executionEnvironments") for the execution environments extension point.
since:
   3.2



EXTENSION_POINT_RUNTIME_CLASSPATH_ENTRY_RESOLVERS
final public static String EXTENSION_POINT_RUNTIME_CLASSPATH_ENTRY_RESOLVERS(Code)
Simple identifier constant (value "runtimeClasspathEntryResolvers") for the runtime classpath entry resolvers extension point.
since:
   2.0



EXTENSION_POINT_RUNTIME_CLASSPATH_PROVIDERS
final public static String EXTENSION_POINT_RUNTIME_CLASSPATH_PROVIDERS(Code)
Simple identifier constant (value "classpathProviders") for the runtime classpath providers extension point.
since:
   2.0



EXTENSION_POINT_VM_INSTALLS
final public static String EXTENSION_POINT_VM_INSTALLS(Code)
Simple identifier constant (value "vmInstalls") for the VM installs extension point.
since:
   3.2



JRELIB_VARIABLE
final public static String JRELIB_VARIABLE(Code)
Classpath variable name used for the default JRE's library (value "JRE_LIB").



JRESRCROOT_VARIABLE
final public static String JRESRCROOT_VARIABLE(Code)
Classpath variable name used for the default JRE's library source root (value "JRE_SRCROOT").



JRESRC_VARIABLE
final public static String JRESRC_VARIABLE(Code)
Classpath variable name used for the default JRE's library source (value "JRE_SRC").



JRE_CONTAINER
final public static String JRE_CONTAINER(Code)
Classpath container used for a project's JRE (value "org.eclipse.jdt.launching.JRE_CONTAINER"). A container is resolved in the context of a specific Java project, to one or more system libraries contained in a JRE. The container can have zero or two path segments following the container name. When no segments follow the container name, the workspace default JRE is used to build a project. Otherwise the segments identify a specific JRE used to build a project:
  1. VM Install Type Identifier - identifies the type of JRE used to build the project. For example, the standard VM.
  2. VM Install Name - a user defined name that identifies that a specific VM of the above kind. For example, IBM 1.3.1. This information is shared in a projects classpath file, so teams must agree on JRE naming conventions.

Since 3.2, the path may also identify an execution environment as follows:

  1. Execution environment extension point name (value executionEnvironments)
  2. Identifier of a contributed execution environment


since:
   2.0



PREF_CONNECT_TIMEOUT
final public static String PREF_CONNECT_TIMEOUT(Code)
Preference key for launch/connect timeout. VM Runners should honor this timeout value when attempting to launch and connect to a debuggable VM. The value is an int, indicating a number of milliseconds.
since:
   2.0



PREF_VM_XML
final public static String PREF_VM_XML(Code)
Preference key for the String of XML that defines all installed VMs.
since:
   2.1





Method Detail
addContainerResolver
public static void addContainerResolver(IRuntimeClasspathEntryResolver resolver, String containerIdentifier)(Code)
Registers the given resolver for the specified container.
Parameters:
  resolver - runtime classpath entry resolver
Parameters:
  containerIdentifier - identifier of the classpath container to register for
since:
   2.0



addVMInstallChangedListener
public static void addVMInstallChangedListener(IVMInstallChangedListener listener)(Code)
Adds the given listener to the list of registered VM install changed listeners. Has no effect if an identical listener is already registered.
Parameters:
  listener - the listener to add
since:
   2.0



addVariableResolver
public static void addVariableResolver(IRuntimeClasspathEntryResolver resolver, String variableName)(Code)
Registers the given resolver for the specified variable.
Parameters:
  resolver - runtime classpath entry resolver
Parameters:
  variableName - variable name to register for
since:
   2.0



computeDefaultRuntimeClassPath
public static String[] computeDefaultRuntimeClassPath(IJavaProject jproject) throws CoreException(Code)
Computes the default application classpath entries for the given project.
Parameters:
  jproject - The project to compute the classpath for The computed classpath. May be empty, but not null.
throws:
  CoreException - if unable to compute the default classpath



computeJREEntry
public static IRuntimeClasspathEntry computeJREEntry(ILaunchConfiguration configuration) throws CoreException(Code)
Returns a runtime classpath entry identifying the JRE to use when launching the specified configuration or null if none is specified. The entry returned represents a either a classpath variable or classpath container that resolves to a JRE.

The entry is resolved as follows:

  1. If the ATTR_JRE_CONTAINER_PATH is present, it is used to create a classpath container referring to a JRE.
  2. Next, if the ATTR_VM_INSTALL_TYPE and ATTR_VM_INSTALL_NAME attributes are present, they are used to create a classpath container.
  3. When none of the above attributes are specified, a default entry is created which refers to the JRE referenced by the build path of the configuration's associated Java project. This could be a classpath variable or classpath container.
  4. When there is no Java project associated with a configuration, the workspace default JRE is used to create a container path.


Parameters:
  configuration - classpath container path identifying a JRE or null
exception:
  org.eclipse.core.runtime.CoreException - if an exception occurs retrievingattributes from the specified launch configuration
since:
   3.2



computeJREEntry
public static IRuntimeClasspathEntry computeJREEntry(IJavaProject project) throws CoreException(Code)
Returns a runtime classpath entry identifying the JRE referenced by the specified project, or null if none. The entry returned represents a either a classpath variable or classpath container that resolves to a JRE.
Parameters:
  project - Java project JRE runtime classpath entry or null
exception:
  org.eclipse.core.runtime.CoreException - if an exception occursaccessing the project's classpath
since:
   3.2



computeJavaLibraryPath
public static String[] computeJavaLibraryPath(IJavaProject project, boolean requiredProjects) throws CoreException(Code)
Returns a collection of paths that should be appended to the given project's java.library.path system property when launched. Entries are searched for on the project's build path as extra classpath attributes. Each entry represents an absolute path in the local file system.
Parameters:
  project - the project to compute the java.library.path for
Parameters:
  requiredProjects - whether to consider entries in required projects a collection of paths representing entries that should be appendedto the given project's java.library.path
throws:
  CoreException - if unable to compute the Java library path
since:
   3.1
See Also:   org.eclipse.jdt.core.IClasspathAttribute
See Also:   JavaRuntime.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY



computeUnresolvedRuntimeClasspath
public static IRuntimeClasspathEntry[] computeUnresolvedRuntimeClasspath(IJavaProject project) throws CoreException(Code)
Computes and returns the default unresolved runtime classpath for the given project. runtime classpath entries
exception:
  CoreException - if unable to compute the runtime classpath
See Also:   IRuntimeClasspathEntry
since:
   2.0



computeUnresolvedRuntimeClasspath
public static IRuntimeClasspathEntry[] computeUnresolvedRuntimeClasspath(ILaunchConfiguration configuration) throws CoreException(Code)
Computes and returns the unresolved class path for the given launch configuration. Variable and container entries are unresolved.
Parameters:
  configuration - launch configuration unresolved runtime classpath entries
exception:
  CoreException - if unable to compute the classpath
since:
   2.0



computeUnresolvedSourceLookupPath
public static IRuntimeClasspathEntry[] computeUnresolvedSourceLookupPath(ILaunchConfiguration configuration) throws CoreException(Code)
Computes and returns the unresolved source lookup path for the given launch configuration.
Parameters:
  configuration - launch configuration runtime classpath entries
exception:
  CoreException - if unable to compute the source lookup path
since:
   2.0



computeVMInstall
public static IVMInstall computeVMInstall(ILaunchConfiguration configuration) throws CoreException(Code)
Returns the VM install for the given launch configuration. The VM install is determined in the following prioritized way:
  1. The VM install is explicitly specified on the launch configuration via the ATTR_JRE_CONTAINER_PATH attribute (since 3.2).
  2. The VM install is explicitly specified on the launch configuration via the ATTR_VM_INSTALL_TYPE and ATTR_VM_INSTALL_ID attributes.
  3. If no explicit VM install is specified, the VM install associated with the launch configuration's project is returned.
  4. If no project is specified, or the project does not specify a custom VM install, the workspace default VM install is returned.

Parameters:
  configuration - launch configuration vm install
exception:
  CoreException - if unable to compute a vm install
since:
   2.0



fireVMAdded
public static void fireVMAdded(IVMInstall vm)(Code)
Notifies all VM install changed listeners of the VM addition
Parameters:
  vm - the VM that has been added
since:
   2.0



fireVMChanged
public static void fireVMChanged(PropertyChangeEvent event)(Code)
Notifies all VM install changed listeners of the given property change.
Parameters:
  event - event describing the change.
since:
   2.0



fireVMRemoved
public static void fireVMRemoved(IVMInstall vm)(Code)
Notifies all VM install changed listeners of the VM removal
Parameters:
  vm - the VM that has been removed
since:
   2.0



getClasspathProvider
public static IRuntimeClasspathProvider getClasspathProvider(ILaunchConfiguration configuration) throws CoreException(Code)
Returns the classpath provider for the given launch configuration.
Parameters:
  configuration - launch configuration classpath provider
exception:
  CoreException - if unable to resolve the path provider
since:
   2.0



getCompositeIdFromVM
public static String getCompositeIdFromVM(IVMInstall vm)(Code)
Returns a String that uniquely identifies the specified VM across all VM types.
Parameters:
  vm - the instance of IVMInstallType to be identified
since:
   2.1



getDefaultJREContainerEntry
public static IClasspathEntry getDefaultJREContainerEntry()(Code)
Creates and returns a classpath entry describing the default JRE container entry. a new IClasspathEntry that describes the default JRE container entry
since:
   2.0



getDefaultVMConnector
public static IVMConnector getDefaultVMConnector()(Code)
Return the default VM connector. Returns the default VM connector.
since:
   2.0



getDefaultVMInstall
public static IVMInstall getDefaultVMInstall()(Code)
Return the default VM set with setDefaultVM(). Returns the default VM. May return null when no defaultVM was set or when the default VM has been disposed.



getExecutionEnvironmentId
public static String getExecutionEnvironmentId(IPath jreContainerPath)(Code)
Returns the execution environment identifier in the following JRE classpath container path, or null if none.
Parameters:
  jreContainerPath - classpath container path execution environment identifier or null
since:
   3.2



getExecutionEnvironmentsManager
public static IExecutionEnvironmentsManager getExecutionEnvironmentsManager()(Code)
Returns the execution environments manager. execution environments manager
since:
   3.2



getJREVariableEntry
public static IClasspathEntry getJREVariableEntry()(Code)
Creates and returns a classpath entry describing the JRE_LIB classpath variable. a new IClasspathEntry that describes the JRE_LIB classpath variable



getJavaProject
public static IJavaProject getJavaProject(ILaunchConfiguration configuration) throws CoreException(Code)
Return the IJavaProject referenced in the specified configuration or null if none.
exception:
  CoreException - if the referenced Java project does not exist
since:
   2.0



getLibraryLocations
public static LibraryLocation[] getLibraryLocations(IVMInstall vm)(Code)
Evaluates library locations for a IVMInstall. If no library locations are set on the install, a default location is evaluated and checked if it exists. library locations with paths that exist or are empty
since:
   2.0



getLibraryPaths
public static String[] getLibraryPaths(IClasspathAttribute attribute)(Code)
Returns an array of strings referencing shared libraries that should appear on the -Djava.library.path system property at runtime for an associated IClasspathEntry , or null if the given attribute is not a CLASSPATH_ATTR_LIBRARY_PATH_ENTRY. Each string is used to create an IPath using the constructor Path(String), and may contain IStringVariable's.

The factory methods newLibraryPathsAttribute(String[]) and getLibraryPaths(IClasspathAttribute) should be used to encode and decode the attribute value.


Parameters:
  attribute - a CLASSPATH_ATTR_LIBRARY_PATH_ENTRY classpath attribute an array of strings referencing shared libraries that shouldappear on the -Djava.library.path system property at runtimefor an associated IClasspathEntry, or null if thegiven attribute is not a CLASSPATH_ATTR_LIBRARY_PATH_ENTRY.Each string is used to create an IPath using the constructorPath(String), and may contain IStringVariable's.
since:
   3.1



getPreferences
public static Preferences getPreferences()(Code)
Returns the preference store for the launching plug-in. the preference store for the launching plug-in
since:
   2.0



getProjectOutputDirectory
public static String getProjectOutputDirectory(ILaunchConfiguration config)(Code)
Return the String representation of the default output directory of the launch config's project or null if there is no config, no project or some sort of problem. the default output directory for the specified launchconfiguration's project
since:
   2.1



getSourceContainers
public static ISourceContainer[] getSourceContainers(IRuntimeClasspathEntry[] entries)(Code)
Returns a collection of source containers corresponding to the given resolved runtime classpath entries.

Note that the entries must be resolved to ARCHIVE and PROJECT entries, as source containers cannot be determined for unresolved entries.


Parameters:
  entries - entries to translate source containers corresponding to the given runtime classpath entries
since:
   3.1



getSourceLookupPathProvider
public static IRuntimeClasspathProvider getSourceLookupPathProvider(ILaunchConfiguration configuration) throws CoreException(Code)
Returns the source lookup path provider for the given launch configuration.
Parameters:
  configuration - launch configuration source lookup path provider
exception:
  CoreException - if unable to resolve the path provider
since:
   2.0



getVMConnector
public static IVMConnector getVMConnector(String id)(Code)
Returns the VM connector defined with the specified identifier, or null if none.
Parameters:
  id - VM connector identifier VM connector or null if none
since:
   2.0



getVMConnectors
public static IVMConnector[] getVMConnectors()(Code)
Returns all VM connector extensions. VM connectors
since:
   2.0



getVMFromCompositeId
public static IVMInstall getVMFromCompositeId(String idString)(Code)
Return the VM corresponding to the specified composite Id. The id uniquely identifies a VM across all vm types.
Parameters:
  idString - the composite id that specifies an instance of IVMInstall
since:
   2.1



getVMInstall
public static IVMInstall getVMInstall(IJavaProject project) throws CoreException(Code)
Returns the VM assigned to build the given Java project. The project must exist. The VM assigned to a project is determined from its build path.
Parameters:
  project - the project to retrieve the VM from the VM instance that is assigned to build the given Java projectReturns null if no VM is referenced on the project's build path.
throws:
  CoreException - if unable to determine the project's VM install



getVMInstall
public static IVMInstall getVMInstall(IPath jreContainerPath)(Code)
Returns the JRE referenced by the specified JRE classpath container path or null if none.
Parameters:
  jreContainerPath - JRE referenced by the specified JRE classpath containerpath or null
since:
   3.2



getVMInstallName
public static String getVMInstallName(IPath jreContainerPath)(Code)
Returns the name of the VM install referenced by the given JRE classpath container path, or null if none.
Parameters:
  jreContainerPath - vm name or null
since:
   3.2



getVMInstallType
public static IVMInstallType getVMInstallType(String id)(Code)
Returns the VM install type with the given unique id.
Parameters:
  id - the VM install type unique id The VM install type for the given id, or null if noVM install type with the given id is registered.



getVMInstallTypeId
public static String getVMInstallTypeId(IPath jreContainerPath)(Code)
Returns the identifier of the VM install type referenced by the given JRE classpath container path, or null if none.
Parameters:
  jreContainerPath - vm install type identifier or null
since:
   3.2



getVMInstallTypes
public static IVMInstallType[] getVMInstallTypes()(Code)
Returns the list of registered VM types. VM types are registered via "org.eclipse.jdt.launching.vmTypes" extension point. Returns an empty list if there are no registered VM types. the list of registered VM types



isContributedVMInstall
public static boolean isContributedVMInstall(String id)(Code)
Returns whether the VM install with the specified id was contributed via the vmInstalls extension point.
Parameters:
  id - vm id whether the vm install was contributed via extension point
since:
   3.2



isVMInstallReference
public static boolean isVMInstallReference(IRuntimeClasspathEntry entry)(Code)
Returns whether the given runtime classpath entry refers to a vm install.
Parameters:
  entry - whether the given runtime classpath entry refers to a vm install
since:
   3.2



newArchiveRuntimeClasspathEntry
public static IRuntimeClasspathEntry newArchiveRuntimeClasspathEntry(IResource resource)(Code)
Returns a new runtime classpath entry for the given archive.
Parameters:
  resource - archive resource runtime classpath entry
since:
   2.0



newArchiveRuntimeClasspathEntry
public static IRuntimeClasspathEntry newArchiveRuntimeClasspathEntry(IPath path)(Code)
Returns a new runtime classpath entry for the given archive (possibly external).
Parameters:
  path - absolute path to an archive runtime classpath entry
since:
   2.0



newDefaultJREContainerPath
public static IPath newDefaultJREContainerPath()(Code)
Returns a path for the JRE classpath container identifying the default VM install. classpath container path
since:
   3.2



newDefaultProjectClasspathEntry
public static IRuntimeClasspathEntry newDefaultProjectClasspathEntry(IJavaProject project)(Code)
Returns a new runtime classpath entry containing the default classpath for the specified Java project.
Parameters:
  project - Java project runtime classpath entry
since:
   3.0



newJREContainerPath
public static IPath newJREContainerPath(IVMInstall vm)(Code)
Returns a path for the JRE classpath container identifying the specified VM install by type and name.
Parameters:
  vm - vm install classpath container path
since:
   3.2



newJREContainerPath
public static IPath newJREContainerPath(String typeId, String name)(Code)
Returns a path for the JRE classpath container identifying the specified VM install by type and name.
Parameters:
  typeId - vm install type identifier
Parameters:
  name - vm install name classpath container path
since:
   3.2



newJREContainerPath
public static IPath newJREContainerPath(IExecutionEnvironment environment)(Code)
Returns a path for the JRE classpath container identifying the specified execution environment.
Parameters:
  environment - execution environment classpath container path
since:
   3.2



newLibraryPathsAttribute
public static IClasspathAttribute newLibraryPathsAttribute(String[] paths)(Code)
Creates a new classpath attribute referencing a list of shared libraries that should appear on the -Djava.library.path system property at runtime for an associated IClasspathEntry .

The factory methods newLibraryPathsAttribute(String[]) and getLibraryPaths(IClasspathAttribute) should be used to encode and decode the attribute value.


Parameters:
  paths - an array of strings representing paths of shared libraries.Each string is used to create an IPath using the constructorPath(String), and may contain IStringVariable's.Variable substitution is performed on each string before a path is constructedfrom a string. a classpath attribute with the name CLASSPATH_ATTR_LIBRARY_PATH_ENTRYand an value encoded to the specified paths.
since:
   3.1



newProjectRuntimeClasspathEntry
public static IRuntimeClasspathEntry newProjectRuntimeClasspathEntry(IJavaProject project)(Code)
Returns a new runtime classpath entry for the given project.
Parameters:
  project - Java project runtime classpath entry
since:
   2.0



newRuntimeClasspathEntry
public static IRuntimeClasspathEntry newRuntimeClasspathEntry(String memento) throws CoreException(Code)
Returns a runtime classpath entry constructed from the given memento.
Parameters:
  memento - a memento for a runtime classpath entry runtime classpath entry
exception:
  CoreException - if unable to construct a runtime classpath entry
since:
   2.0



newRuntimeContainerClasspathEntry
public static IRuntimeClasspathEntry newRuntimeContainerClasspathEntry(IPath path, int classpathProperty) throws CoreException(Code)
Returns a runtime classpath entry for the given container path with the given classpath property.
Parameters:
  path - container path
Parameters:
  classpathProperty - the type of entry - one of USER_CLASSES,BOOTSTRAP_CLASSES, or STANDARD_CLASSES runtime classpath entry
exception:
  CoreException - if unable to construct a runtime classpath entry
since:
   2.0



newRuntimeContainerClasspathEntry
public static IRuntimeClasspathEntry newRuntimeContainerClasspathEntry(IPath path, int classpathProperty, IJavaProject project) throws CoreException(Code)
Returns a runtime classpath entry for the given container path with the given classpath property to be resolved in the context of the given Java project.
Parameters:
  path - container path
Parameters:
  classpathProperty - the type of entry - one of USER_CLASSES,BOOTSTRAP_CLASSES, or STANDARD_CLASSES
Parameters:
  project - Java project context used for resolution, or nullif to be resolved in the context of the launch configuration this entryis referenced in runtime classpath entry
exception:
  CoreException - if unable to construct a runtime classpath entry
since:
   3.0



newStringVariableClasspathEntry
public static IRuntimeClasspathEntry newStringVariableClasspathEntry(String expression)(Code)
Returns a new runtime classpath entry for the given expression that may contain string substitution variable references. The resulting expression refers to an archive (jar or directory) containing class files.
Parameters:
  expression - an expression that resolves to the location of an archive runtime classpath entry
since:
   3.0



newVariableRuntimeClasspathEntry
public static IRuntimeClasspathEntry newVariableRuntimeClasspathEntry(IPath path)(Code)
Returns a new runtime classpath entry for the classpath variable with the given path.
Parameters:
  path - variable path; first segment is the name of the variable; trailing segments are appended to the resolved variable value runtime classpath entry
since:
   2.0



removeVMInstallChangedListener
public static void removeVMInstallChangedListener(IVMInstallChangedListener listener)(Code)
Removes the given listener from the list of registered VM install changed listeners. Has no effect if an identical listener is not already registered.
Parameters:
  listener - the listener to remove
since:
   2.0



resolveRuntimeClasspath
public static IRuntimeClasspathEntry[] resolveRuntimeClasspath(IRuntimeClasspathEntry[] entries, ILaunchConfiguration configuration) throws CoreException(Code)
Resolves the given classpath, returning the resolved classpath in the context of the given launch configuration.
Parameters:
  entries - unresolved classpath
Parameters:
  configuration - launch configuration resolved runtime classpath entries
exception:
  CoreException - if unable to compute the classpath
since:
   2.0



resolveRuntimeClasspathEntry
public static IRuntimeClasspathEntry[] resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry, ILaunchConfiguration configuration) throws CoreException(Code)
Returns resolved entries for the given entry in the context of the given launch configuration. If the entry is of kind VARIABLE or CONTAINER, variable and container resolvers are consulted. If the entry is of kind PROJECT, and the associated Java project specifies non-default output locations, the corresponding output locations are returned. Otherwise, the given entry is returned.

If the given entry is a variable entry, and a resolver is not registered, the entry itself is returned. If the given entry is a container, and a resolver is not registered, resolved runtime classpath entries are calculated from the associated container classpath entries, in the context of the project associated with the given launch configuration.


Parameters:
  entry - runtime classpath entry
Parameters:
  configuration - launch configuration resolved runtime classpath entry
exception:
  CoreException - if unable to resolve
See Also:   IRuntimeClasspathEntryResolver
since:
   2.0



resolveRuntimeClasspathEntry
public static IRuntimeClasspathEntry[] resolveRuntimeClasspathEntry(IRuntimeClasspathEntry entry, IJavaProject project) throws CoreException(Code)
Returns resolved entries for the given entry in the context of the given Java project. If the entry is of kind VARIABLE or CONTAINER, variable and container resolvers are consulted. If the entry is of kind PROJECT, and the associated Java project specifies non-default output locations, the corresponding output locations are returned. Otherwise, the given entry is returned.

If the given entry is a variable entry, and a resolver is not registered, the entry itself is returned. If the given entry is a container, and a resolver is not registered, resolved runtime classpath entries are calculated from the associated container classpath entries, in the context of the given project.


Parameters:
  entry - runtime classpath entry
Parameters:
  project - Java project context resolved runtime classpath entry
exception:
  CoreException - if unable to resolve
See Also:   IRuntimeClasspathEntryResolver
since:
   2.0



resolveSourceLookupPath
public static IRuntimeClasspathEntry[] resolveSourceLookupPath(IRuntimeClasspathEntry[] entries, ILaunchConfiguration configuration) throws CoreException(Code)
Resolves the given source lookup path, returning the resolved source lookup path in the context of the given launch configuration.
Parameters:
  entries - unresolved entries
Parameters:
  configuration - launch configuration resolved entries
exception:
  CoreException - if unable to resolve the source lookup path
since:
   2.0



savePreferences
public static void savePreferences()(Code)
Saves the preferences for the launching plug-in.
since:
   2.0



saveVMConfiguration
public static void saveVMConfiguration() throws CoreException(Code)
Saves the VM configuration information to the preferences. This includes the following information:
  • The list of all defined IVMInstall instances.
  • The default VM
    • This state will be read again upon first access to VM configuration information.



setDefaultVMConnector
public static void setDefaultVMConnector(IVMConnector connector, IProgressMonitor monitor) throws CoreException(Code)
Sets a VM connector as the system-wide default VM. This setting is persisted when saveVMConfiguration is called.
Parameters:
  connector - The connector to make the default. May be null to clear the default.
Parameters:
  monitor - The progress monitor to use
since:
   2.0
throws:
  CoreException - Thrown if saving the new default setting fails



setDefaultVMInstall
public static void setDefaultVMInstall(IVMInstall vm, IProgressMonitor monitor) throws CoreException(Code)
Sets a VM as the system-wide default VM, and notifies registered VM install change listeners of the change.
Parameters:
  vm - The vm to make the default. May be null to clear the default.
Parameters:
  monitor - progress monitor or null



setDefaultVMInstall
public static void setDefaultVMInstall(IVMInstall vm, IProgressMonitor monitor, boolean savePreference) throws CoreException(Code)
Sets a VM as the system-wide default VM, and notifies registered VM install change listeners of the change.
Parameters:
  vm - The vm to make the default. May be null to clear the default.
Parameters:
  monitor - progress monitor or null
Parameters:
  savePreference - If true, update workbench preferences to reflectthe new default VM.
since:
   2.1



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.