this is my sts.ini
-vm
C:/Program Files (x86)/Java/jdk1.6.0_24/bin/javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.1.1.R36x_v20101122_1400.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.2.R36x_v20101222
-product
com.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
584M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xmn128m
-Xms256m
-Xmx1024m
-Xss1m
-XX:PermSize=128m
-XX:MaxPermSize=584m
My STS(Spring Tool Suite) is keep falling on low memory. I tried to increase memory of heap, but if i set -Xmx greater than 1024m (for exeample -Xmx2048m) it writes "Could not create Java Virtual Machine". I have pc with 16GB Ram and OS Windows 7 Professional 64bit and using 32bit 1.6 Java.
How can I give to my STS more memory to prevent the falling if this doesn't work. I tried to google it but I didn't find anything useful.
This limitation is indeed caused by using the 32bit JVM. To use more heap space for your STS or Eclipse installation, please download the 64bit version of it and use it with a 64bit JVM for your Windows system.
Related
I just followed the Eclipse websites links to download the latest version for Debian, and after running from the terminal
$ ./eclipse-inst
It goes through the installation process but returns
JVM terminated. Exit code=1
/usr/lib/jvm/java-9-openjdk-amd64/bin/java
-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
-Xmx1024m
--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/
-Duser.dir=/root/eclipse/java-photon/eclipse
-jar /root/eclipse/java-photon/eclipse//plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /root/eclipse/java-photon/eclipse/eclipse
-name Eclipse
--launcher.library /root/.p2/pool/plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.700.v20180518-1200/eclipse_1705.so
-startup /root/eclipse/java-photon/eclipse//plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
--launcher.appendVmargs
-exitdata eb0026
-product org.eclipse.epp.package.java.product
-vm /usr/lib/jvm/java-9-openjdk-amd64/bin/java
-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
-Xmx1024m
--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/
-Duser.dir=/root/eclipse/java-photon/eclipse
-jar /root/eclipse/java-photon/eclipse//plugins/org.eclipse.equinox.launcher_1.5.0.v20180512-1130.jar
I wasn't able to search the error but it may be because the error is so massive that I don't know which parts of it to search for. I tried searching the initial segment of the error and didn't find much that was useful. What I did find indicated editing the eclipse.ini file, so I did that, and it now looks like the following: [Edit: after the advice of a proposed answer I updated the file to look like the following]
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.dist.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.dist
-showsplash
org.eclipse.platform
#--launcher.XXMaxPermSize
#256m
--launcher.appendVmargs
-vm
/usr/lib/jvm/java-9-openjdk-amd64/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
--add-modules=ALL-DEFAULT
-Xms40m
-Xmx384m
-Dorg.eclipse.equinox.p2.reconciler.dropins.directory=/usr/share/eclipse/dropins
However, after making this edit I see no difference in the error message that the installer brings up.
I believe it's also possible to get Eclipse not by downloading the installer but by using a repo--but as I understand it, this repo usually has a slightly outdated version of Eclipse. I could certainly be wrong, but I believe I've seen advice that it's best to download and use the installer.
When I run java -version it returns
openjdk version "9-internal"
OpenJDK Runtime Environment (build 9-internal+0-2016-04-14-195246.buildd.src)
OpenJDK 64-Bit Server VM (build 9-internal+0-2016-04-14-195246.buildd.src, mixed mode)
When I try to run Eclipse it pops up an error message
An error has occurred. See the log file
/home/bob/.eclipse/org.eclipse.platform_3.8_155965261/configuration/1533437446117.log.
And interestingly, the folder in which the file is supposed to exist, doesn't exist.
This looks like a prerelease build of Java 9, and as such might not support the command line arguments expected in the actual release. Java 9 is current until the end of September, so try the released version if you can.
you have to adjust the eclipse.ini in order to configure Eclipse for Java 9 ...for example:
--launcher.appendVmargs
-vm
/usr/lib/jvm/java-9-openjdk-amd64/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.8
--add-modules=ALL-SYSTEM
or use Java 8 ...
I just installed Eclipse on Linux, but it does not start. What is the problem?
Quite often, Eclipse will not work properly with non-Sun or non-IBM JVMs. These issues are usually related to Blackdown or GCJ. Eclipse has a list of reference platforms that it is tested against which you should try to match against. Try installing one from Sun, IBM, or BEA (eg., Sun JDK 5.0, IBM JDK 5.0, or BEA JRockit 5.0). Version 6 of OpenJDK works too, particularly with Fedora Eclipse.
Running Eclipse neon.3 in a RHEL7 virtualbox VM, with 8GB total RAM. On occasion, Eclipse becomes completely unresponsive and the OS system monitor shows the CPU cores taking turns to go to 100%.
eclipse.ini:
-startup
plugins/org.eclipse.equinox.launcher_1.3.201.v20161025-1711.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.401.v20161122-1740
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.8
-XX:+UseG1GC
-XX:+UseStringDeduplication
-Dosgi.requiredJavaVersion=1.8
-Xms256m
-Xmx1024m
jvisualvm shows that the big consumer is
org.eclipse.equinox.launcher.Main.main()
I watch as the Total Time goes up 1000 ms every second. Looks like a busy loop in what looks like the gtk_OS hooks.
The RAM profile for eclipse looks like the Himalayas, so clearly a memory leak.
Anyone notice this behaviour and know what to do about it?
Thanks,
Robin
p.s. very temporary screen grab https://img42.com/0USxM
p.p.s. doanloadable image of jvisualvm here, https://expirebox.com/download/932e3dcaf6a83022d37c567713f2023b.html
"What I know is that the problem completely disappears after turning off +UseG1GC ."
according to:
https://www.eclipse.org/forums/index.php/t/1082145/
I had the same problem which disappeared after I updated eclipse to oxygen version.
I downloaded birt-report-designer-all-in-one-2_5_0.
enviornment is windows 7, 8gb memory, 64bit OS and jdk1.6.0_45(64 bit)
But while launching , throwing this error
My eclipse.ini is
-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
-vmargs
-Xms512m
-Xmx1024m
-vm D:\java\jdk1.6.0_45\bin\javaw.exe
Note: the same eclipse which is working perfectly fine in my colleague's machine(with exactly same configuration)
Does anyone have other possible solutions?
This is fixed by installing 32 bit jdk 1.6 (uninstall 64 bit jdk)and pointing JAVA_HOME to this installed folder
I've got Eclipse 3.6.1 on my MacBook Air (2010), and I'm getting slowish startup times. Well, slow, compared to my Desktop, which is somewhat less powerful and a few years old).
The startup generally takes 15 seconds, and of this, 4 is spent just on the Eclipse splash screen, before Eclipse loads anything. No projects are open at startup.
Here's a copy of my eclipse.ini.
-startup
../../../plugins/org.eclipse.equinox.launcher_1.1.0.v20100507.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.1.R36x_v20100810
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
512m
--launcher.defaultAction
openFile
-vmargs
-Xms256m
-Xmx512m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Dosgi.requiredJavaVersion=1.6
-Xverify:none
-XX:+UseConcMarkSweepGC
-XX:+CMSClassUnloadingEnabled
-XX:+CMSPermGenSweepingEnabled
-XX:+UnlockExperimentalVMOptions
-XX:+AggressiveOpts
-XX:+StringCache
-XX:+UseFastAccessorMethods
-XX:+UseLargePages
-XX:LargePageSizeInBytes=4m
-XX:AllocatePrefetchLines=1
-XX:AllocatePrefetchStyle=1
-Dide.gc=true
The problem doesn't seem to be related to plugins - I've disabled the ones which I don't need, and regardless of this configuration or whether all of them are selected on startup, it only takes 1second to load the plugins.
I'm running Eclipse 3.6.1 Cocoa x64 build (vanilla) with the Zend Studio plugin. The machine has 4GB RAM, an SSD with over 64% free space, 1.6GHz (4MB L2 Cache). OS is Mac OS X 10.6.6, latest Java available, 1.6.
For comparison, my Desktop, an old P4 3GHZ (512K L2 Cache) with a 7200RPM drive, under 40% free space, Eclipse (same config) loads in under 7 seconds, consistently. Note, this one is a Windows machine, with latest Java installed.
You use the 64-bit version. Try with the 32-bit version.
I have following setup, but when I put 1024 and replace all 512 with 1024, then eclipse won't start at all. How can I have more than 512M memory for my eclipse JVM?
-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
com.springsource.sts.ide
--launcher.XXMaxPermSize
512M
-vm
C:\Program Files (x86)\Java\jdk1.6.0_18\bin\javaw
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms512m
-Xmx512m
-XX:MaxPermSize=512m
I've had a lot of problems trying to get Eclipse to accept as much memory as I'd like it to be able to use (between 2 and 4 gigs for example).
Open eclipse.ini in the Eclipse installation directory.
You should be able to change the memory sizes after -vmargs up to 1024 without a problem up to some maximum value that's dependent on your system. Here's that section on my Linux box:
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XX:MaxPermSize=512m
-Xms512m
-Xmx1024m
And here's that section on my Windows box:
-vmargs
-Xms256m
-Xmx1024m
But, I've failed at setting it higher than 1024 megs. If anybody knows how to make that work, I'd love to know.
EDIT: 32bit version of juno seems to not accept more than Xmx1024m where the 64 bit version accept 2048.
EDIT: Nick's post contains some great links that explain two different things:
The problem is largely dependent on your system and the amount of contiguous free memory available, and
By using javaw.exe (on Windows), you may be able to get a larger allocated block of memory.
I have 8 gigs of Ram and can't set -Xmx to more than 1024 megs of ram, even when a minimal amount of programs are loaded and both windows/linux report between 4 and 5 gigs of free ram.
Here is how i increased the memory allocation of eclipse Juno:
I have a total of 4GB on my system and when im working on eclipse, i dont run any other heavy softwares along side it. So I allocated 2Gb.
The thing i noticed is that the difference between min and max values should be of 512. The next value should be let say 2048 min + 512 = 2560max
Here is the heap value inside eclipse after setting -Xms2048m -Xmx2560m:
Care and feeding of Eclipse's memory hunger is a pain...
http://www.eclipsezone.com/eclipse/forums/t104307.html
https://bugs.eclipse.org/bugs/show_bug.cgi?id=188968
https://bugs.eclipse.org/bugs/show_bug.cgi?id=238378
More or less, keep trying smaller amounts til it works, that's your max.
I don't think you need to change the MaxPermSize to 1024m. This works for me:
-startup
plugins/org.eclipse.equinox.launcher_1.0.200.v20090520.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms256m
-Xmx1024m
-XX:PermSize=64m
-XX:MaxPermSize=128m
You can copy this to your eclipse.ini file to have 1024M:
-clean -showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vmargs
-Xms512m
-Xmx1024m
-XX:PermSize=128m
-XX:MaxPermSize=256m
While working on an enterprise project in STS (heavily Eclipse based) I was crashing constantly and STS plateaued at around 1GB of RAM usage. I couldn't add new .war files to my local tomcat server and after deleting the tomcat folder to re-add it, found I couldn't re-add it either. Essentially almost anything that required a new popup besides the main menus was causing STS to freeze up.
I edited the STS.ini (your Eclipse.ini can be configured similarly) to:
--launcher.XXMaxPermSize
1024M
-vmargs
-Xms1536m
-Xmx2048m
-XX:MaxPermSize=1024m
Rebooted STS immediately and saw it plateau at about 1.5 gigs before finally not crashing
Configuring this worked for me:
-vmargs -Xms1536m -Xmx2048m -XX:MaxPermSize=1024m
on Eclipse Java Photon June 2018
Running Windows 10, 8 GB ram and 64 bit.
You can extend -Xmx2048 -XX:MaxpermSize= 1024m to 4096m too, if your computer has good ram.Mine worked well.