eclipse.ini 文件使用说明
2014-11-03 10:14
204 查看
http://wiki.eclipse.org/Eclipse.ini
If
(or in the case of Mac, the
used when Eclipse is started up. There are many options available, please see here.
http://help.eclipse.org/kepler/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html
Important:
Each option and each argument to an option must be on its own line.
All lines after
so all arguments and options for eclipse must be specified
before
Any use of
unless
By default,
Among other things, this sets the heap space to 40MB initially and a maximum of 512MB,
and also specifies a maximum PermGen size of 256MB.
A max heap of 512MB might be OK for some users, but it's often necessary to bump that value up for large project sets
or when some third-party plugins are installed.
Doing this ensures that you are absolutely certain which JVM Eclipse will run in
and insulates you from system changes that can alter the "default" JVM for your system.
Many a user has been tripped up because they thought they knew what JVM would be used by default,
but they thought wrong. eclipse.ini lets you be CERTAIN.
The following examples of
Note the format of the -vm option - it is important to be exact:
The -vm option and its value (the path) must be on separate lines.
The value must be the full absolute or relative path to the Java executable, not just to the Java home directory.
The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM.
For the 32-bit Eclipse executable (eclipse.exe on Windows) a 32-bit JVM must be used and
for the 64-bit Eclipse executable a 64-bit JVM must be used.
32-bit Eclipse will not work with a 64-bit JVM.
Here is an example of what
Remember that the exact values will differ slightly depending on operating system and Eclipse package.
An alternative way is to insert the following VM option before the -vmargs option in the Eclipse shortcut properties(edit the field Target inside the "Shortcut" tab):
-vm C:\jdk1.7.0_21\bin\javaw.exe
or
-vm C:\jdk1.7.0_21\jre\bin\java.exe
This might not work on all systems. If you encounter "Java was started but returned exit code=1" error while starting the eclipse, modify the
To specify Java 6 for OS X:
For versions of Mac OS X 10.7+ the location has changed to
To be safer, determine the location for the JDK you intend to use via the utility /usr/libexec/java_home and put this value with .../bin/java appended into the Eclipse.ini file.
Overview
Eclipse startup is controlled by the options in$ECLIPSE_HOME/eclipse.ini.
If
$ECLIPSE_HOMEis not defined, the default
eclipse.iniin your Eclipse installation directory
(or in the case of Mac, the
Eclipse.app/Contents/MacOSdirectory) is used.
eclipse.iniis a text file containing command-line options that are added to the command line
used when Eclipse is started up. There are many options available, please see here.
http://help.eclipse.org/kepler/index.jsp?topic=/org.eclipse.platform.doc.isv/reference/misc/runtime-options.html
Important:
Each option and each argument to an option must be on its own line.
All lines after
-vmargsare passed as arguments to the JVM,
so all arguments and options for eclipse must be specified
before
-vmargs(just like when you use arguments on the command-line)
Any use of
-vmargson the command-line replaces all
-vmargssettings in the .ini file
unless
--launcher.appendVmargsis specified either in the .ini file or on the command-line.
By default,
eclipse.inilooks something like this (the exact contents will vary based on operating system and which Eclipse package you have):
-startup ../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.library ../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.100.v20110502 -product org.eclipse.epp.package.jee.product --launcher.defaultAction openFile -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vmargs -Dosgi.requiredJavaVersion=1.5 -XX:MaxPermSize=256m -Xms40m -Xmx512m
Among other things, this sets the heap space to 40MB initially and a maximum of 512MB,
and also specifies a maximum PermGen size of 256MB.
A max heap of 512MB might be OK for some users, but it's often necessary to bump that value up for large project sets
or when some third-party plugins are installed.
Specifying the JVM
One of the most recommended options to use is to specify a specific JVM for Eclipse to run on.Doing this ensures that you are absolutely certain which JVM Eclipse will run in
and insulates you from system changes that can alter the "default" JVM for your system.
Many a user has been tripped up because they thought they knew what JVM would be used by default,
but they thought wrong. eclipse.ini lets you be CERTAIN.
The following examples of
eclipse.inidemonstrate correct usage of the -vm option.
Note the format of the -vm option - it is important to be exact:
The -vm option and its value (the path) must be on separate lines.
The value must be the full absolute or relative path to the Java executable, not just to the Java home directory.
The -vm option must occur before the -vmargs option, since everything after -vmargs is passed directly to the JVM.
For the 32-bit Eclipse executable (eclipse.exe on Windows) a 32-bit JVM must be used and
for the 64-bit Eclipse executable a 64-bit JVM must be used.
32-bit Eclipse will not work with a 64-bit JVM.
Here is an example of what
eclipse.inimight look like on a Windows system after you've added the
-vmargument and increased the maximum heap space:
-startup plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar --launcher.library plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.100.v20110502 -product org.eclipse.epp.package.java.product --launcher.defaultAction openFile --launcher.XXMaxPermSize 256M -showsplash org.eclipse.platform --launcher.XXMaxPermSize 256m --launcher.defaultAction openFile -vm C:\Java\JDK\1.6\bin\javaw.exe -vmargs -Dosgi.requiredJavaVersion=1.5 -Xms40m -Xmx1024m
Remember that the exact values will differ slightly depending on operating system and Eclipse package.
-vm value: Windows Example
This is how the-vmargument might look on Windows (your exact path to
javaw.execould be different, of course):
-vm C:\jdk1.7.0_21\bin\javaw.exe
An alternative way is to insert the following VM option before the -vmargs option in the Eclipse shortcut properties(edit the field Target inside the "Shortcut" tab):
-vm C:\jdk1.7.0_21\bin\javaw.exe
or
-vm C:\jdk1.7.0_21\jre\bin\java.exe
This might not work on all systems. If you encounter "Java was started but returned exit code=1" error while starting the eclipse, modify the
-vmargument to point to
jvm.dll(exact path could be different):
-vm C:\Development\Java\64bit\jdk1.7.0_09\jre\bin\server\jvm.dll
-vm value: Linux Example
This is how the -vm argument might look on Linux (your exact path tojavacould be different, of course):
-vm /opt/sun-jdk-1.6.0.02/bin/java
-vm value: Mac OS X Example
On a Mac OS X system, you can findeclipse.iniby right-clicking (or Ctrl+click) on the Eclipse executable in Finder, choose Show Package Contents, and then locate
eclipse.iniin the
MacOSfolder under
Contents.
To specify Java 6 for OS X:
-vm /System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
For versions of Mac OS X 10.7+ the location has changed to
/Library/Java/JavaVirtualMachines/<''jdk_name_ver''>/Contents/Home/...
To be safer, determine the location for the JDK you intend to use via the utility /usr/libexec/java_home and put this value with .../bin/java appended into the Eclipse.ini file.
相关文章推荐
- ini 文件 使用说明
- 安装完eclipse,dbwear后,需要在他们解压文件.ini下加上你liux的jdk的安装路径,才能正常使用
- SVN删除文件及其恢复 Eclipse使用SVN图标说明
- eclipse.ini文件可以调整eclipse最大使用内存
- 使用jad及eclipse插件进行.class文件的反编译
- 使用Eclipse制作可执行jar文件
- 使用C#操作ini文件
- ini 文件操作记要(1): 使用 TIniFile
- 使用PB调用API自动更新(非FTP模式)(六、AUTODOWN.INI文件)
- eclipse下使用xdoclet生成hibernate的hbm映射文件
- CSS样式,使用VS2005本地文件系统调试能显示,改成使用IIS就死活不显示了!【解决方法汇总说明】
- Eclipse中部分快捷键使用说明
- NOTES.INI 文件的使用
- WININIT.INI文件与Windows病毒(注:如果替换正在使用系统文件)
- 读取INI配置文件GetProfileString和GetPrivateProfileString参数说明和示例
- 文件上传成败关键的几点php.ini配置的几点说明
- 用vb.net读取INI配置文件的方法,使用API
- 本人做的 透明动态加密解密文件系统 使用说明--------招代理商
- 使用C#操作INI文件
- apache中.htaccess配置文件使用说明