from 网络
eclipse 启动参数 -clean2013-06-28 10:53 eclipse 启动参数介绍(如添加插件时,如果不显示,则使用eclipse -clean启动) 其实,Eclipse是一个可以进行非常灵活配置的系统,除了以缺省的方式启动以外,还可以指定各种参数来定制启动方式。在参考了一些资料之后,我总结了一些比较常用的启动时Command Arguments,如果有不正确的地方希望大家予以指出。 -arch [processor architecture] 描述:指定所使用的处理器的类别 举例:eclipse -arch x86或eclipse -arch sparc -application 描述:指定要运行的应用,id为扩展org.eclipse.core.applications扩展点的插件id加扩展id 举例:例如有个插件id为edu.sdu.app,扩展id为myapp,则eclipse -application edu.sdu.app.myapp,就会执行你的扩展应用 -clean 描述:清空插件缓存内容 举例:eclipse -clean,有时插件显示不出来是因为Eclipse将插件进行了缓存以加速启动过程,若指定此参数则会清空缓存,从头加载 -configuration [cofigfile location] 描述:指定配置文件的位置,在启动时使用此目录下的配置文件config.ini来启动 举例:eclipse -configuration d:/eclipse/configuration -data [workspace location] 描述:指定启动时的Workspace位置 举例:例如Workspace位置设在D:/myworkspace,则eclipse -data D:/myworkspace -debug [option file] 描述:以Debug状态启动Eclipse,所有的Debug开关在.options文件中指定 举例:eclipse -debug d:/eclipse/.options -dev [classpath entry] 描述:以开发状态启动Eclipse,这会添加所有指定的路径作为每个插件的Classpath 举例:例如eclipse -dev bin,会将产生在bin目录下的所有类加载到类路径中,这在开发插件时非常有用 -nosplash 描述:指定启动时不显示闪屏 举例:eclipse -nosplash -vm [jre path] 描述:指定启动时所使用的Java虚拟机 举例:例如要使用自己的Java虚拟机,则eclipse -vmD:/j2sdk1.4.2_04/jre/bin/java.exe,这样还有一个好处,就是可以开启一个Console,能够显示控制台信息,当然若使用eclipse -vm D:/j2sdk1.4.2_04/jre/bin/javaw.exe则不会再显示控制台 -vmargs [Java VM arguments] 描述:指定启动时要使用的Java虚拟机参数 举例:例如要指定使用的内存容量,则eclipse -vmargs "-Xms256m -Xmx1024m" 注:此参数一定要放在所有参数变量的最后面 如果你觉得你的Eclipse在启动的时候很慢(比如说超过20秒钟),也许你要调整一下你的Eclipse启动参数了,以下是一些``小贴士‘‘: 1. 检查启动Eclipse的JVM设置。 在Help\About Eclipse SDK\Configuration Detail里面,你可以看到启动Eclipse的JVM。 这个JVM和你在Eclipse中设置的Installed JDK是两回事情。如果启动Eclipse的JVM还是JDK 1.4的话,那最好改为JDK 5,因为JDK 5的性能比1.4更好。 C:\eclipse\eclipse.exe -vm "C:\Program Files\Java\jdk1.5.0_08\ bin\javaw.exe" 2. 检查Eclipse所使用的heap的大小。 在C:\eclipse目录下有一个配置文件eclipse.ini,其中配置了Eclipse启动的默认heap大小 -vmargs -Xms40M -Xmx256M 所以你可以把默认值改为: -vmargs -Xms256M -Xmx512M 当然,也可以这样做,把堆的大小改为256 - 512。 C:\eclipse\eclipse.exe -vm "C:\Program Files\Java\jdk1.5.0_08\ bin\javaw.exe" -vmargs -Xms256M -Xmx512M 3. 其他的启动参数。 如果你有一个双核的CPU,也许可以尝试这个参数: -XX:+UseParallelGC 让GC可以更快的执行。(只是JDK 5里对GC新增加的参数) 转自 http://hi.baidu.com/dd_taiyangxue/item/bde49535c3d4d7be633aff51
from 官网!
-application <id> (Runtime) equivalent to setting eclipse.application to <id> -arch <architecture> (OSGi) equivalent to setting osgi.arch to <architecture> -clean (OSGi) equivalent to setting osgi.clean to "true" -configuration <location> (Main) equivalent to setting osgi.configuration.area to <location> -console [port] (OSGi) equivalent to setting osgi.console to [port]. -consoleLog (Runtime) equivalent to setting eclipse.consoleLog to "true" -data <location> (OSGi) equivalent to setting osgi.instance.area to <location> -debug [options file] (OSGi) equivalent to setting osgi.debug to [options file] or the empty string to simply enable debug (i.e., if the options file location is not specified) -dev [entries] (OSGi) equivalent to setting osgi.dev to [entries] or the empty string to simply enable dev mode (i.e., if entries are not specified) -eclipse.keyring <file path> (Equinox) Set to override location of the default secure storage -eclipse.password <file path> (Equinox) If specified, the secure storage treats contents of the file as a default password. When not set, password providers are used to obtain a password. -feature <feature id> (Runtime) equivalent to setting eclipse.product to <feature id> -framework <location> (Main) equivalent to setting osgi.framework to <location> -initialize (Main) initializes the configuration being run. All runtime related data structures and caches are refreshed. Any user/plug-in defined configuration data is not purged. No application is run, any product specifications are ignored and no UI is presented (e.g., the splash screen is not drawn) -install <location> (Main) equivalent to setting osgi.install.area to <location> --launcher.defaultAction <option> (Executable) specifies the default action to take when the launcher is started without any "-" arguments on the command line. Currently the only supported value is "openFile". The "openFile" option tells the launcher that if it is called with a command line that only contains arguments that do not start with "-", then those arguments should be treated as if they followed "--launcher.openFile". eclipse myFile.txt This is the kind of command line the launcher will receive on windows when you double click a file that is associated with eclipse, or you select and choose "Open With" or "Send To" Eclipse. --launcher.openFile <space separated list of files> (Executable) a space separated list of files to pass to the application. This option is typically used to pass a list of files to be opened by an Eclipse application. This option requires SWT in order to fire the necessary SWT_OPENDOC event for the files that are specified. Relative paths will be resolved first against the current working directory, and second against the eclipse program directory. --launcher.library <location> (Executable) the location of the eclipse executable‘s companion shared library. If not specified the executable looks in the plugins directory for the appropriate org.eclipse.equinox.launcher.[platform] fragment with the highest version and uses the shared library named eclipse_* inside. --launcher.ini <location> (Executable) the location of the product .ini file to use. If not specified the executable will look for a file beside the launcher with the same name and the extension .ini. (ie eclipse.exe looks for eclipse.ini, product.exe looks for product.ini) --launcher.suppressErrors (Executable) If specified the executable will not display any error or message dialogs. This is useful if the executable is being used in an unattended situation. --launcher.secondThread (Executable) MACOSX ONLY If specified the executable will create the Java VM on a secondary thread. This should used if a swing application is being run. SWT will NOT work if this option is specified. --launcher.timeout <value> (Executable) a timeout value for how long the launcher should spend trying to communicate with an already running eclipse before the launcher gives up and launches a new eclipse instance. Default is 60 (seconds). --launcher.XXMaxPermSize <value> (Executable) If specified, and the executable detects that the VM being used is a Sun VM, then the launcher will automatically add the -XX:MaxPermSize=<value> vm argument. The executable is not capable of detecting Sun VMs on all platforms. --launcher.appendVmargs (Executable) If specified, any VM arguments on the commandline will be appended to any VM arguments specified in the launcher .ini file. Using this option is recommended in every launcher .ini file that specifies VM arguments, because the default behavior of overriding VM arguments can have unexpected side-effects. --launcher.overrideVmargs (Executable) If specified on the commandline, overrides the effect of --launcher.appendVmargs in a launcher .ini file such that none of the VM arguments in the .ini file are considered as soon as a -vmargs option is detected on the commandline. -name <string> The name to be displayed in the task bar item for the splash screen when the application starts up (not applicable on Windows). Also used as the title of error dialogs opened by the launcher. When not set, the name is the name of the executable. -nl <locale> (OSGi) equivalent to setting osgi.nl to <locale> -noExit (OSGi) equivalent to setting osgi.noShutdown to "true" -noLazyRegistryCacheLoading (Runtime) equivalent to setting eclipse.noLazyRegistryCacheLoading to "true" -noRegistryCache (Runtime) equivalent to setting eclipse.noRegistryCache to "true" -noSplash (Executable, Main) controls whether or not the splash screen is shown -os <operating system> (OSGi) equivalent to setting osgi.os to <operating system> -pluginCustomization <location> (Runtime) equivalent to setting eclipse.pluginCustomization to <location> -product <id> (OSGi) equivalent to setting eclipse.product to <id> -registryMultiLanguage (Runtime) equivalent to setting eclipse.registry.MultiLanguage to "true" -showSplash <bitmap> (Executable, Main) specifies the bitmap to use in the splash screen. If specified, the launcher may be able to show the splash screen before starting the Java VM. If not specified, Main will find the bitmap using the osgi.splashLocation and osgi.splashPath properties. -startup <location> (Executable) The location of jar used to startup eclipse. The jar referred to should have the Main-Class attribute set to org.eclipse.equinox.launcher.Main. If this parameter is not set, the executable will look in the plugins directory for theorg.eclipse.equinox.launcher bundle with the highest version. -user <location> (OSGi) equivalent to setting osgi.user.area to <location> -vm <path to java vm> (Executable, Main) when passed to the Eclipse executable, this option is used to locate the Java VM to use to run Eclipse. It should be the full file system path to an appropriate: Java jre/bin directory, Java Executable, Java shared library (jvm.dll or libjvm.so), or a Java VM Execution Environment description file. If not specified, the Eclipse executable uses a search algorithm to locate a suitable VM. In any event, the executable then passes the path to the actual VM used to Java Main using the -vm argument. Java Main then stores this value in eclipse.vm. -vmargs [vmargs*] (Executable, Main) when passed to the Eclipse, this option is used to customize the operation of the Java VM to use to run Eclipse. If specified, this option must come at the end of the command line. Even if not specified on the executable command line, the executable will automatically add the relevant arguments (including the class being launched) to the command line passed into Java using the -vmargs argument. Java Main then stores this value in eclipse.vmargs. -ws <window system> (OSGi) equivalent to setting osgi.ws to <window system>
可以看到,还是官网的好, 以后帮助文档的还是找官网的好!
时间: 2024-10-16 20:13:40