Interface EnvironmentInfo
public interface EnvironmentInfo
A Framework service which gives access to the command line used to start
 this running framework as well as information about the environment
 such as the current operating system, machine architecture, locale and
 windowing system.
 
This interface is not intended to be implemented by clients.
- Since:
- 3.0
- Restriction:
- This interface is not intended to be implemented by clients.
- 
Method SummaryModifier and TypeMethodDescriptionString[]Returns all command line arguments specified when the running framework was started.String[]Returns the arguments consumed by the framework implementation itself.getNL()Returns the string name of the current locale for use in finding files whose path starts with$nl$.String[]Returns the arguments not consumed by the framework implementation itself.getOS()Returns the string name of the current operating system for use in finding files whose path starts with$os$.Returns the string name of the current system architecture.getProperty(String key) Returns the value for the specified property.getWS()Returns the string name of the current window system for use in finding files whose path starts with$ws$.booleanReturnstrueif the framework is in debug mode andfalseotherwise.booleanReturnstrueif the framework is in development mode andfalseotherwise.setProperty(String key, String value) Sets the value for the specified property.
- 
Method Details- 
getCommandLineArgsString[] getCommandLineArgs()Returns all command line arguments specified when the running framework was started.- Returns:
- the array of command line arguments.
 
- 
getFrameworkArgsString[] getFrameworkArgs()Returns the arguments consumed by the framework implementation itself. Which arguments are consumed is implementation specific.- Returns:
- the array of command line arguments consumed by the framework.
 
- 
getNonFrameworkArgsString[] getNonFrameworkArgs()Returns the arguments not consumed by the framework implementation itself. Which arguments are consumed is implementation specific.- Returns:
- the array of command line arguments not consumed by the framework.
 
- 
getOSArchString getOSArch()Returns the string name of the current system architecture. The value is a user-defined string if the architecture is specified on the command line, otherwise it is the value returned byjava.lang.System.getProperty("os.arch").- Returns:
- the string name of the current system architecture
 
- 
getNLString getNL()Returns the string name of the current locale for use in finding files whose path starts with$nl$.- Returns:
- the string name of the current locale
 
- 
getOSString getOS()Returns the string name of the current operating system for use in finding files whose path starts with$os$. ReturnConstants.OS_UNKNOWNif the operating system cannot be determined.The value may indicate one of the operating systems known to the platform (as specified in org.eclipse.core.runtime.Platform#knownOSValues) or a user-defined string if the operating system name is specified on the command line.- Returns:
- the string name of the current operating system
 
- 
getWSString getWS()Returns the string name of the current window system for use in finding files whose path starts with$ws$. Returnnullif the window system cannot be determined.- Returns:
- the string name of the current window system or null
 
- 
inDebugModeboolean inDebugMode()Returnstrueif the framework is in debug mode andfalseotherwise.- Returns:
- whether or not the framework is in debug mode
 
- 
inDevelopmentModeboolean inDevelopmentMode()Returnstrueif the framework is in development mode andfalseotherwise.- Returns:
- whether or not the framework is in development mode
 
- 
getPropertyReturns the value for the specified property. Environment Properties are backed by the Java system properties. When the optionosgi.framework.useSystemPropertiesis used then the environment properties are specific for each instance of the framework.This method should be used instead of the System.getProperty(String)method to avoid the global nature of system properties.- Parameters:
- key- the property key
- Returns:
- the value of the property, or null
- Since:
- 3.4
 
- 
setPropertySets the value for the specified property. Environment Properties are backed by the Java system properties. When the optionosgi.framework.useSystemPropertiesis used then the environment properties are specific for each instance of the framework.This method should be used instead of the System.setProperty(String, String)method to avoid the global nature of system properties.- Parameters:
- key- the property key
- value- the value of the property
- Returns:
- the old value of the property, or null
- Since:
- 3.4
 
 
-