Can't increase Scala Eclipse heap size - eclipse

I read the docs and append the given snipped in my eclipse.ini. I also read this, and concluded that since I'm on Linux, I have to substitute -XX:MaxPermSize, but that changed nothing either.
I get this error when trying to launch eclipse:
JVM terminated. Exit code=1
/usr/java/default/bin/java
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx384m
-XX:MaxPermSize=256m
--launcher.XXMaxPermSize 256m
-vmargs
-Xms256m
-Xmx1024m
-XX:PermSize=64m
-Xss1M
-server
-XX:+DoEscapeAnalysis
-jar /home/pc/eclipse//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /home/pc/eclipse/eclipse
-name Eclipse
--launcher.library /home/pc/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.2.R36x_v20101019_1345/eclipse_1310.so
-startup /home/pc/eclipse//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
-exitdata 1ab0003
-product org.eclipse.epp.package.java.product
-vm /usr/java/default/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx384m
-XX:MaxPermSize=256m
--launcher.XXMaxPermSize 256m
-vmargs
-Xms256m
-Xmx1024m
-XX:PermSize=64m
-Xss1M
-server
-XX:+DoEscapeAnalysis
-jar /home/pc/eclipse//plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
I have the latest 2.9 scala plugin with Helios Eclipse.(Version: Helios Service Release 2
Build id: 20110218-0911)

remove
--launcher.XXMaxPermSize 256m
and only use
-XX:MaxPermSize=256m
The relevant parts of my eclipse.ini look like this:
-vmargs
-Xms2048m
-Xmx2048m
-XX:+CMSPermGenSweepingEnabled
-XX:+CMSClassUnloadingEnabled
-XX:PermSize=256M -XX:MaxPermSize=256M
-Xss2m
-server

Related

Performance tuning for SCALA-Ide plugin on Eclipse 2020-03

I'm learning Apache spark with scala and using scala-ide for eclipse on my desktop. Seems like there is a need of performance optimizations for my eclipse-ide since it keeps going into non-responsive state on quite often (and recovers in 2-3 secs). Any suggestions?
My eclipse.ini looks like this -
-startup
plugins/org.eclipse.equinox.launcher_1.5.700.v20200207-2156.jar
--launcher.library
C:\Users\<username>\.p2\pool\plugins\org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.1100.v20190907-0426
-product
org.eclipse.epp.package.jee.product
-showsplash
C:\Users\<username>\.p2\pool\plugins\org.eclipse.epp.package.common_4.15.0.20200313-1200
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
C:/Program Files/Java/jdk1.8.0_241/bin/javaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Dosgi.instance.area.default=#user.home/eclipse-workspace
-XX:+UseG1GC
-XX:+UseStringDeduplication
--add-modules=ALL-SYSTEM
-Dosgi.requiredJavaVersion=1.8
-Dosgi.dataAreaRequiresExplicitInit=true
-Xms256m
-Xmx2048m
--add-modules=ALL-SYSTEM
-Declipse.p2.max.threads=10
-Doomph.update.url=http://download.eclipse.org/oomph/updates/milestone/latest
-Doomph.redirection.index.redirection=index:/->http://git.eclipse.org/c/oomph/org.eclipse.oomph.git/plain/setups/
-XX:PermSize=512m
-XX:MaxPermSize=512m
-Xmx2048m
-Xms1024m

JVM terminated with Exit Code 1 while accessing JFrame

I am using Eclipse Mars Ide on Ubuntu 15.10. When I was trying to create JFrame, Eclipse is trying to initialize design and while initializing, it suddenly stops and showing:
JVM terminated. Exit code=1
/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
-Dosgi.requiredJavaVersion=1.7
-XX:MaxPermSize=256m
-Xms256m
-Xmx1024m
-jar /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
-os linux
-ws gtk
-arch x86_64
-showsplash /opt/eclipse//plugins/org.eclipse.platform_4.5.2.v20160212-1500/splash.bmp
-launcher /opt/eclipse/eclipse
-name Eclipse
--launcher.library /opt/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.v20150602-1417/eclipse_1612.so
-startup /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.appendVmargs
-exitdata 2f8001
-product org.eclipse.epp.package.java.product
-vm /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XX:MaxPermSize=256m
-Xms256m
-Xmx1024m
-jar /opt/eclipse//plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
Default JDK of System is JDK8.
BUT I have written JDK7 in eclipse.ini page
code of eclipse.ini is
-startup
plugins/org.eclipse.equinox.launcher_1.3.100.v20150511-1540.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.300.v20150602-1417
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vm
/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.7
-XX:MaxPermSize=256m
-Xms256m
-Xmx1024m
doing default JDK7 producing to run other Java program.
Please help to get rid of this, so that I can work on Jframe.
For me deinstalling the 3d Vision Driver did the trick, like posted here

Unable to install Eclipse, "Failed to create Java Virtual Machine." error

-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
128M
-showsplash
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
128m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.7.0_45
-Xms40m
-Xmx768m
-Declipse.buildId=v22.3.0-887826
-XX:MaxPermSize=256M
System Specification:
Processor:Intel(R)Core(TM)i5 CPU M450 # 2.40 GHz
RAM:3GB
System Type: 32 bit
Make Sure you are following these steps.
1) Install jdk(1.6 or 1.7) and set the path in enviornment variables.
2) Download android SDK ADT bundle from Android developers site.
3) Thats all you need to do basically.
Now, if you are getting "Failed to create the java virtual machine".
What you have to do is, edit your eclipse.ini file. Which is there in eclipse
folder.
And write the following line in eclipse.ini file.
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
-vm
C:\Java\jdk1.7.0_29\bin\javaw.exe
--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
128M
-showsplash
com.android.ide.eclipse.adt.package.product
--launcher.XXMaxPermSize
128m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.7.0_45
-Xms40m
-Xmx768m
-Declipse.buildId=v22.3.0-887826
-XX:MaxPermSize=256M
Imp Note: Replace **C:\Java\jdk1.7.0_29\bin\javaw.exe** with your path.

eclipse.ini file and options

I have downloaded eclipse and looked into its eclipse.ini file which contains this:
-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.reporting.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m
Why does it contain the option:
--launcher.XXMaxPermSize
256M
two times where 'M' is used in the first case and 'm' is used in the second case?
Looks to be a bug in packaging or a plugin. Please open a bug report at bugs.eclipse.org. Make sure to specify exactly which package you've downloaded and if you installed any plugins (list which ones) after you've extracted the initial package.
I went into many options for the eclipse.ini.
I use Java 7 with a Intel Core i7 with 8Go of Ram, and windows 7. The performance of eclipse and the impact of eclipse.ini depends on the configuration of the machine.
We have big projects with big workspaces.
Here is my eclipse.ini:
-vm
C:/Java/jdk1.7.0_21/jre/bin/server/jvm.dll
-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
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.7
-Dhelp.lucene.tokenizer=standard
-vmargs
-XX:ParallelGCThreads=4
-XX:+CMSClassUnloadingEnabled
-XX:+UnlockExperimentalVMOptions
-XX:+UseG1GC
-XX:+UseFastAccessorMethods
-XX:ReservedCodeCacheSize=64m
-XX:CompileThreshold=500
-XX:MaxHeapFreeRatio=70
-XX:ErrorFile=./hs_err_pid<pid>.log
-Xms512m
-Xmx1024m
-Dsun.java2d.opengl=true
-Dsun.java2d.d3d=true
-Dawt.nativeDoubleBuffering=true
-Duser.language=en_US
-Xverify:none
-XgcPrio:deterministic
-XpauseTarget:20
-XX:+UseTLAB
-XX:MaxTenuringThreshold=0
-XX:SurvivorRatio=128
I wish good luck to you.
If you have time to test it and have any comment, please help us improve it.
Regards
ECI

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/