STS taking long time to start - java

Can any one please suggest, Why STS(Version: 3.4.0.RELEASE) taking long time to start.
My PC Deatails:
Window 7,
Ram : 4GB,
i3 processor,
32 bit O.S
STS.ini Details:
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.1.200.v20130807-1835
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-vmargs
-Dorg.eclipse.swt.browser.IEVersion=10001
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-XX:MaxPermSize=256m
-Dorg.eclipse.swt.browser.IEVersion=10001
I already searched for this issue but i can't got any good solution,any help is really appreciated.

May be you can try following
Increase from -Xms40m to -Xms500m. It indicates jvm to start with 500 Mb memory.
Try with STS –clean
Remove file <WORK_SPACE>/.metadata.plugins\org.eclipse.core.resources.projects\.markers.snap, because sometimes eclipse will constantly polling a fairly large snapshot of some of your projects.
You can disable ‘Refresh workspace on startup’ option in Windows -> Preferences -> General -> Startup and Shutdown
Disable automatic builds under Install/updated and Label Decorator
Upgrading to the latest JVM supported on your machine this may help as well
Disable all validations under preferences unless you need them
I hope these tips will help you for sure :) .

My STS was taking a long time, 5 minutes just to boot up, in spite of running on a high performance SSD machine. So I modified the STS.ini with Xms=200m(original value was 40m) and it started booting up real fast in under 30 seconds.
-Dosgi.requiredJavaVersion=1.8
--add-modules=ALL-SYSTEM
-Xms300m
-Dosgi.module.lock.timeout=10
-Dorg.eclipse.swt.browser.IEVersion=10001
-Xmx1200m

STS is based off eclipse so some the answers on this site re speeding up eclipse will help.
I noticed a great speed up by installing a Solid State Drive. This
speeds up your whole machine.
Using the latest oracle JDK speeds things up for me too.

Related

Eclipse ADT running out of memory and keeps crashing?

I've been using ADT for a while now and things have been going smoothly enough. All of a sudden, Eclipse declares that it's short on memory "Java heap space" troubles and whatnot... I've searched all over and every piece of advice seems to point to editing the file eclipse.ini.
Most of the advice said to turn the memory up to 512m. I did that, but it wasn't fixing anything. So I upped it to 1024m. Still no luck, so I upped it again to 2048m. Still no success! My eclipse.ini now looks like this:
-showsplash
org.eclipse.platform
-startup
../../../plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx.x86_64_1.1.200.v20120913-144807
-product
com.android.ide.eclipse.adt.package.adtproduct
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
1024m
--launcher.defaultAction
openFile
-vmargs
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Dosgi.requiredJavaVersion=1.6
-XX:MaxPermSize=1024m
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-Xms1024m
-Xmx2048m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
ADT still crashes. It seems like 2048m should be plenty of memory already, but ADT still complains about it. So is there another problem that could be prompting this symptom? Keep in mind that my app was working just fine minutes before the IDE started going bonkers.
EDIT:
I've also tried deleting the entire ADT folder from Applications (I use a Mac), re-placed it back with a different copy of the ADT again. This also did nothing.
I had the same Problem. I solved it by making space in my c drive.
You can try this:
Run Ccleaner and make some space in your C drive
Create your AVD with 512 memory
I eventually found the culprit: an errant JAR file in the project library. After deleting it, things ran normally again.
Back up your dev environment
Install latest version of eclipse with adt into a new folder. https://developer.android.com/sdk/index.html
When you start the new version of eclipse point it to your old workspace.
Edit
One of things I do is set every project to the same api level. Api 19.

Eclipse becomes unresponsive

I m using Eclipse Indigo. It becomes unresponsive often and finally prompts saying out of memory error and asks me to exit workbench. I increased the Perm Gen space as told in one of the eclipse forums by editing my eclipse.ini file.
Eclipse.ini file contents now is as 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
-XX:MaxPermSize=256m
-vm C:/Java/jdk1.5.0_15
I mostly do Javascript development in eclipse. And I am not able to edit JS file in eclipse.
What can I do to solve this problem?
Currently maximum only 512MB is allowed for eclipse in your ini (-Xmx512m), if you have enough RAM you shall try increasing it to 1GB. More info here http://wiki.eclipse.org/FAQ_How_do_I_increase_the_heap_size_available_to_Eclipse%3F
This problem may be due to
You are using old java version , You need to upgrade it with new version
If your operation system is 64 bit make sure that you are using 64bit java
Java 5 is pretty old. The GC (and overall optimizations) are slow, outdated and patch level 15 means you're missing many critical bug fixes.
The first step would be to install Java 7 (lastest version). Make sure you disable the browser plugin because of the security risks.
Then make sure that Eclipse uses it: Update the path after -vm. Note: If your path contains spaces, use this:
-vm
c:\Program Files\Java\...
(i.e. put the path into a line of it's own).
Lastly, there are two kinds of memory in Java. Heap and PermGen. The error message tells you which one ran out. Use -Xmx to set heap memory and -XX:MaxPermSize= for PermGen. 256m PermGen should be enough but some script languages need more.
With Java 7, enable GC1 which should give you better performance: -XX:+UseG1GC

Does Eclipse/Java run on WIndows 7 64 bits?

I noticed a lot of problems when trying to run Eclipse and Java on 64 bits MS Windows. Is it supported? Is this something I shouldn't do or try to do?
I extracted Eclipse helios 64 bits zip, then I installed Java and I was able to run Eclipse for day or two.
Now I have been working hard for a few hours to reproduce a working Eclipse and I am arriving at the conclusion that probably it is not such a good idea. It is 64bits OS, 64 bits Helios, 64 bits Java. Could it possibly work?
Java runs on billions of device supposedly but I doubt if it will ever run 'again' on my laptop. If it does work I suppose it is just luck.
Uninstall everything and try downloading fresh again. I am using eclipse in my 64 bit windows machine for long time now and it works fine.
Try using versions which I am using currently. These work perfect for me -
jdk1.7.0_21 and jre7 and eclipse version 3.7.2
Now, I am using 64-bit Windown 7 with JDK 1.6.xxx. There is no any problem.
Make sure JAVA_HOME to do enviroment variable. Otherwise, you need to configure vm configuration in eclipse.ini.
You also note of that memory setting for eclipse. It is base on your physical memory.
eclipse.ini
.....
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m

An internal error occurred during: "Updating indexes".Java heap space during eclipse start up?

I am getting below error while starting eclipse
An internal error occurred during: "Updating indexes".Java heap space?
It was running fine half an hour before.I restarted the eclipse and getting this error now? i have 8 gb ram,window 7 64 bit OS.
i have tried restarting my system but nothing helped?
-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
-showsplash
org.eclipse.platform
-showLocation
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-vm
C:/Program Files (x86)/Java/jdk1.6.0_25/bin/javaw.exe
-vmargs
-Dfile.encoding=UTF-8
-Dosgi.requiredJavaVersion=1.5
-Xms512m
-Xmx1024m
Not sure what i is the issue?
If you have m2e or other Maven plugin installed, you should check if the option at 'Window -> Preferences -> Maven -> Download repository updates index on startup' is enabled. Disable it and see if it resolves out of memory issue.
If you are using eclipse or myeclipse, you can increase memory by making changes in .ini file (myeclipse.ini)
-Xmx2048m
-XX:MaxPermSize=1024m
-XX:ReservedCodeCacheSize=512m
-Dosgi.nls.warnings=ignore
It will solve problem connected with heap space.
Assuming this is a heap space problem, try this FAQ:
Eclipse-Wiki: FAQ How do I increase the heap size available to Eclipse?
This may not be directly related to the question, but this fixed the java heap issues I had:
Launch eclipse using eclipse -vmargs -Xmx2048m.
From the readme included with the eclipse install:
By default, Eclipse will allocate up to 512 megabytes of Java heap
memory. This should be ample for all typical development tasks.
However, depending on the JRE that you are running, the number of
additional plug-ins you are using, and the number of files you will be
working with, you could conceivably have to increase this amount.
Eclipse allows you to pass arguments directly to the Java VM using the
-vmargs command line argument, which must follow all other Eclipse specific arguments. Thus, to increase the available heap memory, you
would typically use:
eclipse -vmargs -Xmx<memory size>
with the value set to greater than "512M" (512 megabytes
-- the default).
Old question, but I got this issue and adding more memory did not solve, so I rebuilt the java index by applying this comment from eclipse bug tracker:
I Quote:
Click in "Quick Access", Type "Rebuild Java Index" (Actually just start typing it, use the auto completion), Hit enter.

Problem with increasing Java heap size in Eclipse

I have a problem with error saying ERROR: 'Java heap space'. I followed these instructions to increase the heap size for Eclipse, but it doesn't work. Eclipse seems to be ignoring the given values. My eclipse.ini file looks like this:
-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
-product
org.eclipse.epp.package.java.product
--launcher.defaultAction
openFile
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
-XX:MaxPermSize=512m
-Xms512m
-Xmx1024m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.ecli
pse.swt.internal.carbon.smallFonts
The Eclipse version is 3.6.1 running on Mac.
Any ideas what might be wrong?
Are you sure you are configuring parameters for your application execution and not for Eclipse itself?
I usually configure heap size in the Run | Run Configuration dialog.
Try to supply -vmargs directly to Eclipse executable instead of eclipse.ini file.
eclipse -vmargs -Xms512m -Xmx730m
There is a bug in Eclipse, that prevents it from supplying "vmargs" clause of eclipse.ini to JVM.
Humm... -XX:MaxPermSize=512m -Xms512m -Xmx1024m all looking fine. When are you having this error?
At Startup? Can you try switching JVM or downloading the 32 bit version?
When building? Try this guide to give ANT more memory: http://ericfickes.com/2008/10/osx-flexbuilder-java-heap-space-error/
On the App Server / Servlet Container? Increase it's heapsize and permgen space.
Eclipse.ini is for eclipse itself not for running applications. For that use a run configuration to set the start parameters.
One more note: java on MacOSX doesn't have the XX:MaxPermSize or any another XX flags.
To those who get the same error under Eclipse, try to restore cache files (if they were removed accidentally in WAR folder ), this way I solve the same problem under my Eclipse' project. note: I don't think there is a link between Memory allowed to Eclipse and memory for App.

Categories

Resources