osgi控制台命令:getprop

在osgi控制台,直接键入getprop,可查看所有ogsi启动时参数

实际上,这些参数都在Eclipse平台启动类org.eclipse.core.runtime.adaptor.EclipseStarter中有定义(位于org.eclipse.osgi插件中),查看源码即一目了然。
该类不允许在外部实例化,它自身有一个main方法用于启动平台。
也可通过Startup方法将其启动。
eg:
String[] equinoxArgs = {"-console","1234","-noExit"};
 BundleContext context = EclipseStarter.startup(equinoxArgs,null);

如下:
// System properties
 public static final String PROP_BUNDLES = "osgi.bundles"; //$NON-NLS-1$
 public static final String PROP_BUNDLES_STARTLEVEL = "osgi.bundles.defaultStartLevel"; //$NON-NLS-1$ //The start level used to install the bundles
 public static final String PROP_EXTENSIONS = "osgi.framework.extensions"; //$NON-NLS-1$
 public static final String PROP_INITIAL_STARTLEVEL = "osgi.startLevel"; //$NON-NLS-1$ //The start level when the fwl start
 public static final String PROP_DEBUG = "osgi.debug"; //$NON-NLS-1$
 public static final String PROP_DEV = "osgi.dev"; //$NON-NLS-1$
 public static final String PROP_CLEAN = "osgi.clean"; //$NON-NLS-1$
 public static final String PROP_CONSOLE = "osgi.console"; //$NON-NLS-1$
 public static final String PROP_CONSOLE_CLASS = "osgi.consoleClass"; //$NON-NLS-1$
 public static final String PROP_CHECK_CONFIG = "osgi.checkConfiguration"; //$NON-NLS-1$
 public static final String PROP_OS = "osgi.os"; //$NON-NLS-1$
 public static final String PROP_WS = "osgi.ws"; //$NON-NLS-1$
 public static final String PROP_NL = "osgi.nl"; //$NON-NLS-1$
 private static final String PROP_NL_EXTENSIONS = "osgi.nl.extensions"; //$NON-NLS-1$
 public static final String PROP_ARCH = "osgi.arch"; //$NON-NLS-1$
 public static final String PROP_ADAPTOR = "osgi.adaptor"; //$NON-NLS-1$
 public static final String PROP_SYSPATH = "osgi.syspath"; //$NON-NLS-1$
 public static final String PROP_LOGFILE = "osgi.logfile"; //$NON-NLS-1$
 public static final String PROP_FRAMEWORK = "osgi.framework"; //$NON-NLS-1$
 public static final String PROP_INSTALL_AREA = "osgi.install.area"; //$NON-NLS-1$
 public static final String PROP_FRAMEWORK_SHAPE = "osgi.framework.shape"; //$NON-NLS-1$ //the shape of the fwk (jar, or folder)
 public static final String PROP_NOSHUTDOWN = "osgi.noShutdown"; //$NON-NLS-1$
 private static final String PROP_FORCED_RESTART = "osgi.forcedRestart"; //$NON-NLS-1$

 public static final String PROP_EXITCODE = "eclipse.exitcode"; //$NON-NLS-1$
 public static final String PROP_EXITDATA = "eclipse.exitdata"; //$NON-NLS-1$
 public static final String PROP_CONSOLE_LOG = "eclipse.consoleLog"; //$NON-NLS-1$
 public static final String PROP_IGNOREAPP = "eclipse.ignoreApp"; //$NON-NLS-1$
 public static final String PROP_REFRESH_BUNDLES = "eclipse.refreshBundles"; //$NON-NLS-1$
 private static final String PROP_ALLOW_APPRELAUNCH = "eclipse.allowAppRelaunch"; //$NON-NLS-1$
 private static final String PROP_APPLICATION_LAUNCHDEFAULT = "eclipse.application.launchDefault"; //$NON-NLS-1$

你可能感兴趣的:(OSGI/Equniox)