Eclipse.ini Configuration Instructions

Source: Internet
Author: User
Tags xms

The launch of Eclipse is controlled by%eclipse_home%/eclipse.ini, and if $eclipse_home is not defined, the default Eclipse.ini under the Eclipse installation directory will take effect. Eclipse.ini is a text file whose content is equivalent to the command-line arguments that were added to Eclipse.exe after Eclipse was run.

Format:
1: All the options and their associated parameters must be in a separate line, if the parameter shape such as "Item Value" form, the middle of the space needs to write a newline, if the value of a space is enclosed in double quotation marks;
2: All parameters after-vmargs will be passed to the JVM, all if all parameters set on Eclipse must be written before-vmargs.

Some of the parameters are as follows:

-arch [processor architecture]
Description: Specifies the category of the processor being used
Example:-arch x86 or-arch SPARC

-application [id]
Description: Specify the app to run with the extension ID plus the extension IDs for the extended org.eclipse.core.applications extension point ID
For example, if you have a plugin ID of Edu.sdu.app and the extension ID is MyApp, then-application Edu.sdu.app.myapp will execute your extended application

-clean
Description: Emptying the plugin cache content
For Example:-clean, sometimes the plugin does not show up because eclipse caches the plug-in to speed up the boot process, and if specified this parameter empties the cache and loads it from the beginning

-configuration [cofigfile location]
Description: Specify the location of the configuration file to start using the profile Config.ini under this directory at startup
Example:-configuration d:/eclipse/configuration

-data [Workspace location]
Description: Specifies the workspace location at startup
Examples: For example, if the workspace location is located in D:/myworkspace, then-data d:/myworkspace

-debug [option file]
Description: Starts eclipse in the debug state, and all debug switches are specified in the. options file
Example:-debug d:/eclipse/.options

-dev [classpath entry]
Description: Launches Eclipse in development state, which adds all specified paths as classpath for each plug-in
Example:-dev bin, which loads all classes generated in the bin directory into the classpath, is useful when developing plug-ins

-nosplash
Description: Specifies that the splash screen is not displayed at startup
Example:-nosplash

-VM [JRE Path]
Description: Specifies the Java virtual machine to be used at startup
For example, if you want to use your own Java Virtual machine, then-VM D:/j2sdk1.4.2_04/jre/bin/java.exe, there is another benefit, is that you can open a console to display console information, of course, if you use-VM d:/ J2sdk1.4.2_04/jre/bin/javaw.exe will no longer display the console
Note The format of the-VM option is strictly required:
The 1:-VM option and its value (path) must be on a separate line;
2: Its value must be strictly pointed to the Java executable file, not just the Java home directory;
The 3:-VM option must have been previously stated before the -vmargs option, and all options after-vmargs will be passed directly to the JVM.

-vmargs [Java VM arguments]
Description: Specifies the Java Virtual machine parameters to be used at startup
NOTE: This parameter must be placed on the last side of all parameter variables
As-vmargs
-xms40m

-xmx256m
-xx:permsize=64m
-xx:maxpermsize=128m
Heap and non-heap (non-heap) memory
According to the official statement, "Java virtual machines have a heap, the heap is a runtime data region, and all class instances and arrays of memory are allocated from here." Heap is in Javacreated when the virtual machine is started. "" The memory outside the heap in the JVM is called non-heap (non-heap memory) ". You can see that the JVM primarily manages two types of memory: heap and non-heap. Simply put, the heap is Java code memory, is left to developers to use;a non-heap is a JVM left to itself, so the method area, the JVM internally processes or optimizes the required memory (such as the JIT-compiled code cache), each class structure (such as running a constant pool, field, and method data), and methods and construction methodsthe code is in non-heap memory.
Heap memory allocation:
the initial memory allocated by the JVM is specified by-XMS, which defaults to the 1/64 of the physical memory;
the maximum allocated memory for the JVM is specified by-XMX, which defaults to 1/4 of the physical memory.
when the default free heap memory is less than 40%, the JVM will increase the heap until the maximum limit of-xmx;
when free heap memory is greater than 70%, the JVM will reduce the heap until the minimum limit of-XMS.
so the server generally sets-xms,-xmx equal to avoid resizing the heap after each GC.

non-heap memory allocations:
The JVM uses-xx:permsize to set the non-heap memory initial value, which defaults to the 1/64 of the physical memory;
The maximum amount of non-heap memory is set by Xx:maxpermsize, which defaults to 1/4 of physical memory.

JVM Memory Limit (max)
First, the JVM memory is limited to the actual maximum physical memory, assuming that the physical memory is infinitely large, the maximum value of the JVM memory is very much related to the operating system. simply put, 32-bit processor Although the controllable memory space has 4GB, but the specific operating system will give a limit, this limit is generally 2GB-3GB (generallyUnder windows, the 1.5g-2g,linux system is 2g-3g), and processors over 64bit are not limited.

Setting the VM parameters causes the program to fail to start for several reasons:
1) The value of-XMS in the parameter is greater than-XMX, or the value of-xx:permsize is greater than-xx:maxpermsize;
2) The sum of-XMX values and-xx:maxpermsize exceeds the maximum limit of JVM memory, such as the maximum memory limit of the current operating system, or actual physical memory, and so on.
when it comes to physical memory, it is important to note that if your memory is 1024MB, the actual system is not likely to be 1024MB, because a portion of it is consumed by the hardware.   

local Eclipse.ini detailed;

-startup

Plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar

--launcher.library

plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.1.r36x_v20100810

-product

Org.eclipse.epp.package.jee.product

--launcher.defaultaction

OpenFile

--launcher. Xxmaxpermsize (Note that the front is two connection lines, which are basically consistent with the xx:maxpermsize, the only difference is the former

256M is the parameter set when the Eclipse.exe is started , which is a parameter in the JVM used by Eclipse and can be commented out with a #. )

-showsplash

Org.eclipse.platform

-vmargs

-dosgi.requiredjavaversion=1.5

-xms40m

-xmx512m

-dfile.encoding=utf-8 (the default encoding for Eclipse is the encoding of the operating system kernel, which in Chinese windows is naturally

-dsun.jnu.encoding=utf-8 GBK, but the generic text file is the UTF-8 format, causing conflicts, so you need to redefine how the JVM is encoded. )


This article is from the "six-degree space" blog, be sure to keep this source http://jasonwalker.blog.51cto.com/7020143/1416718

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.