|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.core.runtime.adaptor.EclipseStarter
public class EclipseStarter
Special startup class for the Eclipse Platform. This class cannot be instantiated; all functionality is provided by static methods.
The Eclipse Platform makes heavy use of Java class loaders for loading plug-ins. Even the Eclipse Runtime itself and the OSGi framework need to be loaded by special class loaders. The upshot is that a client program (such as a Java main program, a servlet) cannot reference any part of Eclipse directly. Instead, a client must use this loader class to start the platform, invoking functionality defined in plug-ins, and shutting down the platform when done.
Note that the fields on this class are not API.
Field Summary | |
---|---|
static boolean |
debug
|
protected static java.lang.String |
DEFAULT_ADAPTOR_CLASS
string containing the classname of the adaptor to be used in this framework instance |
protected static java.lang.String |
DEFAULT_CONSOLE_CLASS
|
static java.lang.String |
PROP_ADAPTOR
|
static java.lang.String |
PROP_ARCH
|
static java.lang.String |
PROP_BUNDLES
|
static java.lang.String |
PROP_BUNDLES_STARTLEVEL
|
static java.lang.String |
PROP_CHECK_CONFIG
|
static java.lang.String |
PROP_CLEAN
|
static java.lang.String |
PROP_CONSOLE
|
static java.lang.String |
PROP_CONSOLE_CLASS
|
static java.lang.String |
PROP_CONSOLE_LOG
|
static java.lang.String |
PROP_DEBUG
|
static java.lang.String |
PROP_DEV
|
static java.lang.String |
PROP_EXITCODE
|
static java.lang.String |
PROP_EXITDATA
|
static java.lang.String |
PROP_EXTENSIONS
|
static java.lang.String |
PROP_FRAMEWORK
|
static java.lang.String |
PROP_FRAMEWORK_SHAPE
|
static java.lang.String |
PROP_IGNOREAPP
|
static java.lang.String |
PROP_INITIAL_STARTLEVEL
|
static java.lang.String |
PROP_INSTALL_AREA
|
static java.lang.String |
PROP_LOGFILE
|
static java.lang.String |
PROP_NL
|
static java.lang.String |
PROP_NOSHUTDOWN
|
static java.lang.String |
PROP_OS
|
static java.lang.String |
PROP_REFRESH_BUNDLES
|
static java.lang.String |
PROP_SYSPATH
|
static java.lang.String |
PROP_WS
|
Constructor Summary | |
---|---|
EclipseStarter()
|
Method Summary | |
---|---|
protected static org.eclipse.osgi.framework.log.FrameworkLog |
createFrameworkLog()
|
protected static java.lang.String |
getSysPath()
|
static BundleContext |
getSystemBundleContext()
Returns the context of the system bundle. |
static boolean |
isRunning()
Returns true if the platform is already running, false otherwise. |
static void |
main(java.lang.String[] args)
This is the main to start osgi. |
static java.lang.Object |
run(java.lang.Object argument)
Runs the application for which the platform was started. |
static java.lang.Object |
run(java.lang.String[] args,
java.lang.Runnable endSplashHandler)
Launches the platform and runs a single application. |
static void |
setInitialProperties(java.util.Map initialProperties)
Sets the initial properties for the platform. |
static void |
shutdown()
Shuts down the Platform. |
static BundleContext |
startup(java.lang.String[] args,
java.lang.Runnable endSplashHandler)
Starts the platform and sets it up to run a single application. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static boolean debug
public static final java.lang.String PROP_BUNDLES
public static final java.lang.String PROP_BUNDLES_STARTLEVEL
public static final java.lang.String PROP_EXTENSIONS
public static final java.lang.String PROP_INITIAL_STARTLEVEL
public static final java.lang.String PROP_DEBUG
public static final java.lang.String PROP_DEV
public static final java.lang.String PROP_CLEAN
public static final java.lang.String PROP_CONSOLE
public static final java.lang.String PROP_CONSOLE_CLASS
public static final java.lang.String PROP_CHECK_CONFIG
public static final java.lang.String PROP_OS
public static final java.lang.String PROP_WS
public static final java.lang.String PROP_NL
public static final java.lang.String PROP_ARCH
public static final java.lang.String PROP_ADAPTOR
public static final java.lang.String PROP_SYSPATH
public static final java.lang.String PROP_LOGFILE
public static final java.lang.String PROP_FRAMEWORK
public static final java.lang.String PROP_INSTALL_AREA
public static final java.lang.String PROP_FRAMEWORK_SHAPE
public static final java.lang.String PROP_NOSHUTDOWN
public static final java.lang.String PROP_EXITCODE
public static final java.lang.String PROP_EXITDATA
public static final java.lang.String PROP_CONSOLE_LOG
public static final java.lang.String PROP_IGNOREAPP
public static final java.lang.String PROP_REFRESH_BUNDLES
protected static final java.lang.String DEFAULT_ADAPTOR_CLASS
protected static final java.lang.String DEFAULT_CONSOLE_CLASS
Constructor Detail |
---|
public EclipseStarter()
Method Detail |
---|
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public static java.lang.Object run(java.lang.String[] args, java.lang.Runnable endSplashHandler) throws java.lang.Exception
eclipse.application
System property. This convenience method starts
up the platform, runs the indicated application, and then shuts down the
platform. The platform must not be running already.
args
- the command line-style arguments used to configure the platformendSplashHandler
- the block of code to run to tear down the splash
screen or null
if no tear down is required
java.lang.Exception
- if anything goes wrongpublic static boolean isRunning()
protected static org.eclipse.osgi.framework.log.FrameworkLog createFrameworkLog()
public static BundleContext startup(java.lang.String[] args, java.lang.Runnable endSplashHandler) throws java.lang.Exception
eclipse.application
System property. The platform must not be running already.
The given runnable (if not null
) is used to tear down the splash screen if required.
args
- the arguments passed to the application
java.lang.Exception
- if anything goes wrongpublic static java.lang.Object run(java.lang.Object argument) throws java.lang.Exception
The given argument is passed to the application being run. If it is null
then the command line arguments used in starting the platform, and not consumed
by the platform code, are passed to the application as a String[]
.
argument
- the argument passed to the application. May be null
java.lang.Exception
- if anything goes wrongpublic static void shutdown() throws java.lang.Exception
On return, the Platform will no longer be running (but could be re-launched with another call to startup). If relaunching, care must be taken to reinitialize any System properties which the platform uses (e.g., osgi.instance.area) as some policies in the platform do not allow resetting of such properties on subsequent runs.
Any objects handed out by running Platform, including Platform runnables obtained via getRunnable, will be permanently invalid. The effects of attempting to invoke methods on invalid objects is undefined.
java.lang.Exception
- if anything goes wrongprotected static java.lang.String getSysPath()
public static void setInitialProperties(java.util.Map initialProperties)
run(String[], Runnable)
or
startup(String[], Runnable)
methods for the properties to be used in
a launched instance of the platform.
If the specified properties contains a null value then the key for that value will be cleared from the properties of the platform.
initialProperties
- the initial properties to set for the platform.public static BundleContext getSystemBundleContext()
null
is returned if the platform is not running.
java.lang.SecurityException
- If the caller does not have the
appropriate AdminPermission[system.bundle,CONTEXT]
, and
the Java Runtime Environment supports permissions.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |