Regarding slow performance of eclipse - java

I am using eclipse 3.7 indigo , the issue that I am facing is when I start my eclipse my machine gets too slow even the eclipse get hang some times in between , the settings of my eclipse.ini file is below..
-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.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
please advise how to overcome from this..!!

Change this values to the higher ones:
--launcher.XXMaxPermSize 256m
-Xms40m
-Xmx512m

Perhaps this will help? I mean, I don't know the specs of the machine you're on, but this is nice on less powerful machines.
What are the best JVM settings for Eclipse?

Check with the eclipse.ini file and add the following java parameters and values.
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xmn128m
-Xms1024m
-Xmx1024m
-Xss2m
-XX:PermSize=256m
-XX:MaxPermSize=256m
-XX:+UseParallelGC
This worked for me. Might help.

Related

Java Heap Space error is occurring

Java Heap Space error occurring in my system. I tried lot of solutions from Stack Overflow but nothing is working. When i am working
when pressing OK then
(No error in my project)
My eclipse.ini Is:
-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.v20120913-144807
-product
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256M
-showsplash
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Declipse.buildId=v22.3.0-887826
-XX:MaxPermSize=512M
My RAM:4GB
Please help me to solve this issue.
It's because Eclipse runs out of memory. What you can do is increase the allocated memory by editing (or creating) the eclipse.ini file (on a root of eclipse directory) and putting the following code:
-vmargs
-Xms512m (for 512 Mb)
-Xmx1024m (for 1024 Mb)
For a full list of available options, please check this link.
Change in eclipse.ini
-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.v20120913-144807
-product
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256M
-showsplash
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Xms512m
-Xmx512m
-Dosgi.requiredJavaVersion=1.6
-Declipse.buildId=v22.3.0-887826
-XX:MaxPermSize=512M
you increase jvm memory in control panel. Its ok you have 4GB of memory but how much you have allocated for jvm to run is important let me know any further clarification.

Eclipse Failed to create Java Virtual Machine after changing eclipse.ini file

-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-showlocation
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-vm
C:/Program Files/Java/jdk1.7.0_09/jre/bin/server/jvm.dll
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Dhelp.lucene.tokenizer=standard
-Declipse.p2.unsignedPolicy=allow
-Xms512m
-Xmx384m
-Xss4m
-XX:PermSize=128m
-XX:MaxPermSize=384m
-XX:CompileThreshold=5
-XX:MaxGCPauseMillis=10
-XX:MaxHeapFreeRatio=70
-XX:+CMSIncrementalPacing
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:+UseFastAccessorMethods
-Xincgc
-XX:-DontCompileHugeMethods
-XX:MaxInlineSize=1024
-XX:FreqInlineSize=1024
-Dcom.sun.management.jmxremote
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=C:/Prog/Java/eclipse_addons
-Dsun.lang.ClassLoader.allowArraySyntax=true
-debug
org.eclipse.equinox.p2.core/debug=true
org.eclipse.equinox.p2.core/reconciler=true
This is my eclipse.ini file after I changed it. This is the eclipse.ini file before I changed it:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_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
Anyone have any suggestions? I tried changing:
-Dosgi.requiredJavaVersion=1.6
-Xms512m
to
-Dosgi.requiredJavaVersion=1.7
-Xms1024m
with no luck
One reason is that your -Xms parameter (initial heap size) defines a larger heap size than the -Xmx parameter (maximum heap size), you should fix it. If after fixing it the problem remains try to revert to the original eclipse.ini file and apply the parameters one by one to see which is the other 'wrong one'.
You seem to have changed a lot of things in one go.
As a general strategy, I would suggest reverting to the original settings, and then make the changes one at a time, starting with the most important one ... or the one that is most likely to work.

Eclipse fails to create JVM after defining --launcher.XXMaxPermSize in eclipse.ini

I was using Eclipse and I got java.lang.OutOfMemoryError: PermGen space error. In Eclipse FAQ it says I should add these lines to eclipse.ini:
--launcher.XXMaxPermSize
[xxx]m
where xxx is the memory size I want to use (I tried 256). But after I do this I get Failed to create Java Virtual Machine error on Eclipse startup. What should I do to get it working?
My eclipse.ini file before editing:
-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
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
--launcher.defaultAction
openFile
-vmargs
-Xms40m
-Xmx1024m
You need to adjust your eclipse.ini to include the argument -XX:MaxPermSize + specify a specific JVM for Eclipse to run on by adding the -vm option just before the -vmargs option. Ex:
-vm
C:\Java\JDK\1.6\bin\javaw.exe (The exact path to javaw.exe)
-vmargs
-Xms40m
-Xmx1024m
The -vm option and its value (the path) must be on separate lines.
A complete example:
-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
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
C:\Java\JDK\1.6\bin\javaw.exe
-vmargs
-XX:MaxPermSize=256m
-Xms40m
-Xmx768m
Your eclipse.ini should be:
-XX:MaxPermSize=256m

Debug in Eclipse : inspect variable -> errors during evaluation

I'm working on a piece of Java code and I have a dump problem. I'm doing some debugging and for some reason, when I'm trying to evaluate (watch or inspect) some variables declared inside a method it displays the following error:
errors during the evaluation.
I don't get it.
I'm using Eclipse 3.7.
For instance, it does the same even for the method parameters (which should be available until the end of the execution of the method).
My eclipse.ini file is:
-startup
plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.100.v20110502
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
1024M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx1024M
It seems that the problem was one of my eclipse plugin.
I had several plugins, some code review plugin. I just uninstalled them all and now it works.

Eclipse -vm option trouble

I'm having trouble setting up a new eclipse installation with the -vm option. I'm using the eclipse.ini file below (which has worked in the past). I need this for the m2eclipse plugin. Currently, if I include the -vm option eclipse fails to start.
Any idea what the problem is with this?
-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
-vm
C:\Program Files\Java\jdk1.6.0_20\bin\javaw.exe
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-XX:PermSize=256m
-XX:MaxPermSize=512m
-Xms128m
-Xmx1024m
Are you using a 64bit version of Eclipse with a 32bit JVM?
I'm guessing its the space in the Program Files part of the path. The below example works fine for me. Can you try to install the JDK in c:/apps and see if the script below works for you?
-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
-vm
C:/apps/jdk1.6.0_15/bin/javaw.exe
-product
org.eclipse.epp.package.java.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-server
-Dosgi.requiredJavaVersion=1.5
-Xms1200m
-Xmx1200m

Categories