Eclipse启动参数

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

Eclipse启动参数的相关文章

(转)eclipse 启动参数介绍(如添加插件时,如果不显示,则使用eclipse -clean启动)

本文转载自:http://hi.baidu.com/dd_taiyangxue/blog/item/08950f3991b4e8c9d46225c8.html 其实,Eclipse是一个可以进行非常灵活配置的系统,除了以缺省的方式启动以外,还可以指定各种参数来定制启动方式.在参考了一些资料之后,我总结了一些比较常用的启动时Command Arguments,如果有不正确的地方希望大家予以指出. -arch [processor architecture]描述:指定所使用的处理器的类别举例:ecl

Eclipse启动参数优化

-Xverify:none-Xmx512m-Xms512m-Xmn128m-XX:PermSize=96m-XX:MaxPermSize=96m-XX:+DisableExplicitGC-Xnoclassgc-XX:+UseParNewGC-XX:+UseConcMarkSweepGC-XX:CMSInitiatingOccupanyFraction=85

jconsole 连接 eclipse启动项目

eclipse 启动java项目默认没有开启jmx远程查看功能,如果需要看项目运行的线程内存使用量等信息,可以在eclipse启动参数中增加: -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=8011 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false 如图: 接着通过jconsol

JVM参数调优:Eclipse启动实践

本文主要参考自<深入理解 Java 虚拟机>.这本书是国人写的难得的不是照搬代码注释的且不是废话连篇的技术书,内容涵盖了 Java 从源码到字节码到执行的整个过程,包括了 JVM(Java Virtual Machine)的架构,垃圾收集的介绍等.这里摘录出关于配置 JVM 基本参数来调优 Eclipse 启动的过程,比较初级,供初学者参考. 基础知识 针对 JVM 的参数调优主要集中在数据区大小的控制和垃圾回收策略的选择.关于 JVM 运行机制等更多内容可参考其他博文 JVM 的运行时数据区

Eclipse jvm启动参数在哪设置

学习并转载自https://jingyan.baidu.com/article/624e7459653ca534e8ba5a26.html Java是一门非常受欢迎的编程语言,Java的开发人员多数使用Eclipse作为自己的IDE, 在代码调试的过程中有时会遇到内存不足的错误,有没有办法手动指定JVM的启动 参数呢?所以今天笔者和大家分享下"jvm启动参数在哪设置",希望能给大家带来一些帮助. ①打开Eclipse ②创建一个类,编写一段演示用的代码,在代码编辑区右键单击,依次选择[

eclipse启动时报错 Could not create the java virtual machine

eclipse启动的时候 报错 这是系统为eclipse分配的内存不足,需要去修改  eclipse.ini文件 eclipse.ini是eclipse 内存分配之类的配置文件   对java虚拟机的内存管理 常见参数的意思 -vmargs:说明后面是VM的参数    -Xms40m:虚拟机占用系统的最小内存    -Xmx256m:虚拟机占用系统的最大内存    -XX:PermSize:最小堆大小.一般报内存不足时,都是说这个太小, 堆空间剩余小于5%就会警告,建议把这个稍微设       

eclipse启动的时候报错 出现Java was started but returned exit code=13

eclipse启动的时候出现 这是你的jdk环境与你eclipse版本不匹配, 如果你的eclipse是32位的 jdk也得是32位的   重新安装一个比配的jdk就好了 如果你的jdk是解压版的  解压后 在bin文件夹下 找到 javaw.exe复制路径 为你的eclipse创建一个快捷方式  右键属性    菜单条  点击快捷方式 -- 目标     先原本的目标路径下  添加参数 -clear -vm   javaw.exe的路径 注意 :添加参数必须有空格 D:\Idiot-job\e

eclipse启动时jdk环境变量的问题及解决办法

以前傻乎乎的,每次安装什么软件都是下载个windows安装文件,然后双击完exe文件就是一个劲儿的点下一步.知道完成,就心满意足的去使用了,后来发现机子卡了,垃圾多了,有些软件明明自己貌似没点安装竟然也有.当时觉得好神奇,现在才发现,那都是自己的问题.好了废话不多说了,接下来说下在本机没有安装JDK的情况下eclipse启动时报的错误及解决办法. eclipse(下载链接:[eclipse](http://pan.baidu.com/s/1mgu0COw)刚刚下载之后 如果没有安装JDK和配置环

Eclipse启动之三 : 启动器插件(百度空间迁移)

Eclipse启动之三启动器插件 空间 启动插件名为org.eclipse.equinox.launcher.<version>,入口类org.eclipse.core.launcher.main.它是Eclipse虚拟机启动的最早的插件 main整体流程: 1.处理命令行参数 2.设置虚拟机属性 3.处理配置 4.获取安装路径 5.获取启动路径 6.加载JNI动态库 7.设置安全属性 8.处理闪屏 9.启动Eclipse核心框架 1.处理命令行参数           解析命令行参数 -sh