Update the eclipse.ini to increase heap but no effect in eclipse? - eclipse

I use Eclipse Kepler SR2 on Ubuntu 14.04 and the following is my eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140116-2212
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
3072m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs -Dorg.eclipse.swt.browser.XULRunnerPath=/DevTools/xulrunner -Dorg.eclipse.swt.browser.Defau$
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=3072m
-Xms2048m
-Xmx3072m
But in eclipse the heap size shows the following:
397 of 453M
And if I mouse over on the Heap size info it shows:
Heap size: 397M of total: 453M max: 455M mark: 397M
I am expecting the max value should be close to 3072M since that is what being set in eclipse.ini
Any insight is appreciated.

Each entry in the eclipse.ini must be on a separate line, your line:
-vmargs -Dorg.eclipse.swt.browser.XULRunnerPath=/DevTools/xulrunner -Dorg.eclipse.swt.browser.Defau$
will not be recognized as the start of the VMargs. It should be:
-vmargs
-Dorg.eclipse.swt.browser.XULRunnerPath=/DevTools/xulrunner
... more args on separate lines ...

I think manual installations cause such problems as my eclipse ignores eclipse.ini completely when run via the launcher in Ubuntu (14.04) (used lock to launcher). So the workaround for me is to run it any other way. Desktop icon works too. Property Path must be set within that file.

Related

Eclipse (Mars) not getting started after a java Upgrade

When I am starting the eclipse I am getting this error. -vm argument contains the path of the java.exe which is not their in my system possible after a java upgrade. How Can I correct this?
Java was started but returned exit code=13
C:/ProgramData/Oracle/java/javapath/java.exe....
This path does not exist in my system
Eclipse.INI contents are
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20140603-1326
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx512m
osgi.requiredJavaVersion=1.6
this line specifies to use Java 6. If you upgraded JAVA you should update this field.
https://wiki.eclipse.org/Eclipse.ini#Specifying_the_JVM
My JVM seems to be 32 bit and Eclipse is definitely 64 bit may that is the reason and earlier location it referred must have had 64 bit Java which got uninstalled in whole upgrade process somewhere. I guess I will just download the 32 bit version of Eclipse Mars and that would solve the problem. –

Increase JVM max heap size for Eclipse

I am trying to increase the max heap size for my Eclipse. I have tried specifying in eclipse.ini or through the command line, but are not working.
My max heap size has the exact same limit before (running jconsole) and after (System.out.println(java.lang.Runtime.getRuntime().maxMemory());) starting Eclipse. 1.8G
Is there any way to modify JVM heap size before it is launched (ex. a config file?)
What could I be doing wrong when specifying heap size to Eclipse?
This is the command:
./eclipse/eclipse -debug -consoleLog -vmargs -Xms1000m -Xmx6000m -XX:-UseGCOverheadLimitcl
This is my eclipse.ini (which values are overwritten by the specified eclipse launching parameters):
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Dhelp.lucene.tokenizer=standard
-XX:MaxPermSize=6000m
-Xms1000m
-Xmx6000m
It is possible to increase heap size allocated by the Java Virtual Machine (JVM) by using command line options.
-Xms<size> set initial Java heap size
-Xmx<size> set maximum Java heap size
-Xss<size> set java thread stack size
If you are using the tomcat server, you can change the heap size by going to Eclipse/Run/Run Configuration and select Apache Tomcat/your_server_name/Arguments and under VM arguments section use the following:
-XX:MaxPermSize=256m
-Xms256m -Xmx512M
If you are not using any server, you can type the following on the command line before you run your code:
java -Xms64m -Xmx256m HelloWorld
More information on increasing the heap size can be found here
You can use this configuration:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20120913-144807
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms512m
-Xmx1024m
-XX:+UseParallelGC
-XX:PermSize=256M
-XX:MaxPermSize=512M
Try to modify the eclipse.ini so that both Xms and Xmx are of the same value:
-Xms6000m
-Xmx6000m
This should force the Eclipse's VM to allocate 6GB of heap right from the beginning.
But be careful about either using the eclipse.ini or the command-line ./eclipse/eclipse -vmargs .... It should work in both cases but pick one and try to stick with it.
--launcher.XXMaxPermSize
256m
Try to bump that value up!

changing jdk in eclipse

I am trying to update my eclipse to work with a jdk and not a jre.
I followed the instruction in this forum , also search google for answers but for some reason it still don't work.
I try'ed going to preferences ->java->install jre's , removing the old jre from there and using the path for the jdk.
also try'ed going to project properties -> java build path -> jre system libraries -> edit-> workspace default jre.it also says there i'm using jdk.
I even try'ed adding to the ini file the next path C:\Program Files\Java\jdk1.6.0_31\bin\javaw.exe
but when i try'ed deploying my program to app engine i get the next message :
Unable to update app: Cannot get the System Java Compiler. Please use a JDK, not a JRE.
my eclipse version is juno 4.2 and my jdk version is 1.6.0_31
I don't know what else i need to change. I even uninstall my older jre from my computer but eclipse still don't work with the jdk ( although it recognize it )
I'm out of idea's ... anyone could help me please ??
this is my ini file :
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m
-vm
C:\Program Files\Java\jdk1.6.0_31\bin
thanks for the help
If you want to change JVM Eclipse itself should run on, the right place for that is eclipse.ini. Here are instructions on how to specify that: eclipse.ini.
Common mistakes are specifying -vm parameter name and the value in one line, or missing '-vm', or misplacing it. Also, pay attention to -vm format on different OSes.
EDIT (after .ini file published): your -vm option comes after -vmargs, which is wrong (both lines are treated as VM args). The correct parameter placement in your .ini file would look like this:
...
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Program Files\Java\jdk1.6.0_31\bin
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m
Below you can find my eclipse ini where I set a dedicated JDK via
-vm C:/Program Files (x86)/Java/jdk1.7.0_10/bin/javaw.exe
Have a look at the section "Specifiying the Java Virtual Machine" in the eclipse help.
Quote:
Tip: It's generally a good idea to explicitly specify which Java VM to use when running Eclipse. This is achieved with the "-vm" command line argument as illustrated above. If you don't use "-vm", Eclipse will look on the O/S path. When you install other Java-based products, they may change your path and could result in a different Java VM being used when you next launch Eclipse.
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20120522-1813
-vm
C:/Program Files (x86)/Java/jdk1.7.0_10/bin/javaw.exe
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-vmargs
-Dorg.eclipse.ecf.provider.filetransfer.httpclient.retrieve.readTimeout=999999
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms128m
-Xmx1024m
None of the other answers worked for me. I eventually just removed the "jre7" directory and, presto-chango, Eclipse started using the JDK that was installed next to it.

eclipse crashes while trying to build

I was wondering if someone could explain why my eclipse is crashing. Eclipse says its trying to build and then there is a message not responding and I receive this message as eclipse close in figure 1
figure 1
The startup jvm memory allocated to eclipse seems to be low, in the screenshot provided:
-Xms40m -Xmx512m
Increasing these values might provide eclipse more memory to build project.
(Try closing all unused projects in the eclipse workspace)
Assuming your machine has RAM > 2-3 GB,
Modify the file eclipse.ini (in your case at C:\eclipse\eclipse.ini)
Update values of '-Xms' and '-Xmx' to following
....
-Xms512m
-Xmx1024m
The problem is Memory dedicated to eclipse .
this is the way my problem solved
fist :~>locate eclipse.ini
/home/ your - user /eclipse/eclipse.ini
Second
vi /home/ your - user /eclipse/eclipse.ini
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20150204-1316
-product
org.eclipse.epp.package.cpp.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XX:MaxPermSize=1024m
-Xms512m
-Xmx2048m
Then change This lines
--launcher.XXMaxPermSize
512m // mine was 256
-XX:MaxPermSize=1024m // mine was 512
-Xms512m // mine was 40
-Xmx2048m // mine was 512
Done :)

Eclipse INI Configuration problem

I am working on a project which is really big and even if I increase the virtual memory, on refreshing the project, Eclipse crashes. The error is java heap space error.
This is the current setup:
-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
512M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx512m
If I increase it any more, Eclipse won't start.
A few comments:
You shouldn't define twice launcher.XXMaxPermSize
You shouldn't use 512M (only 512m, see "FAQ How do I increase the permgen size available to Eclipse?")
Depending on your JDK used for launching Eclipse, you might want to stick with Sun option -XX:MaxPermSize=512m
Even though those aren't the heap space parameters, they might influence how Eclipse runs.
This is the best configuration for Eclipse NEON and o.s. Windows 10 with 4GB of Ram:
-startup
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
–launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.401.v20161122-1740
-product
org.eclipse.epp.package.jee.product
–launcher.defaultAction
openFile
–launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
–launcher.XXMaxPermSize
256m
–launcher.defaultAction
openFile
-vm
C:/Program Files/Java/jdk1.8.0_121/bin/javaw.exe
–launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx512m
-XX:PermSize=256m
-XX:MaxPermSize=512m
If you have 8GB of Ram modify -XX:PermSize=512m and -XX:MaxPermSize=1024m.
For complete example see here :
https://lentux-informatica.com/best-configuration-eclipse-ini/