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
Related
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.
I was using Spring tool suite, I just upgraded it to latest version spring-tool-suite-3.5.1.RELEASE-e4.3.2-linux-gtk-x86_64 and now I am not able to start it. It gives below error:
VM terminated. Exit code=1
/usr/bin/java
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-XX:MaxPermSize=256m
-jar /home/vishal/install/sts/sts-3.5.1.RELEASE//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
-os linux
-ws gtk
-arch x86_64
-showsplash
-launcher /home/vishal/install/sts/sts-3.5.1.RELEASE/STS
-name STS
--launcher.library /home/vishal/install/sts/sts-3.5.1.RELEASE//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.200.v20140116-2212/eclipse_1508.so
-startup /home/vishal/install/sts/sts-3.5.1.RELEASE//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
--launcher.overrideVmargs
-exitdata 98006
-product org.springsource.sts.ide
-vm /usr/bin/java
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-XX:MaxPermSize=256m
-jar /home/vishal/install/sts/sts-3.5.1.RELEASE//plugins/org.eclipse.equinox.launcher_1.3.0.v20130327-1440.jar
I have ubuntu 12.04 and this Java version:
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
This is STS.ini
-vm
/usr/lib/jvm/jdk1.7.0/bin/java
-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.springsource.sts.ide
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms40m
-Xmx768m
-XX:MaxPermSize=256m
The above error cause by STS version.
At this site: http://spring.io/tools/sts/all , Download STS version what support 32 bit (x86) or 64 bit (x64) computer.
I am not a java developer but had to look into java code.I faced the same issue stated above and fixed it in different way. located STS.ini, opened it and changed the version from 1.6 to 1.7. bingo... its started working..
I faced the same problem after another software updated 1.8 32 bit client VM, where I am running on 64 bit Windows 7. This issue was resolved after I installed JDK 1.8 64 bit Server VM.
The .ini file you posted points to /usr/lib/jvm/jdk1.7.0/bin/java but the error log shows it's actually using /usr/bin/java. That suggests you're not using the .ini you think you are. Double check you're launching from the correct directory/executable.
May not be the case here, but usually this kind of error means the JVM is 32 bit where it needs to be 64 bit or vice versa. Double check that the JVM you are using matches your downloaded STS with respect to 32/64 bit.
Also the answer from E-Riz makes sense. Check exactly what '/usr/bin/java' actually points to (it is probably a symlink). Try the following commands
/usr/bin/java -version
Also track down the symlink
ls -la /usr/bin/java
This will tell you where it points (probably /etc/alternatives/java, which is another symlink. Repeat until you get to the end of the symlink chain. If this doesn't lead to where you think it should (i.e. /usr/lib/jvm/jdk1.7.0/bin/java) then E-riz is right and you are probably not running the STS.ini that you think you are.
I tried to resolve this error in so many ways, but nothing worked for me. At last I uninstalled all my java installations from Control Panel, and reinstalled Java 1.8 and it worked :)
This error with STS is pretty common when you start for the first time. Here is what I found on YouTube, will help eliminate the error: https://youtu.be/cMClVM6rzuc
I had the same issue when trying to open Sprint STS on my Windows machine (64 bits).
The problem was, in fact, that the STS download page, by default, downloads the Windows 32 bits version and it was not working because of that on my 64 bits Windows.
I just went to the STS download page again and download the right version (64 bits) and it solved my issue.
Best regards!
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.
I was trying to setup Spring mvc projects on eclipse. Basic projects were working fine. But using restful services, jersey etc started giving so many errors related to dependencies. So I am planning to move on to STS.
I am using STS 2.9.2. It was giving me "failed to create java virtual machine". So I added
-vm C:\Program Files\Java\jdk1.7.0\bin\javaw.exe
to STS.ini. But now it is giving me following fatal error
Below is STS.ini
-vm
C:\Program Files\Java\jdk1.7.0\bin\javaw.exe
-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
com.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
884M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xmn128m
-Xms256m
-Xmx768m
-Xss1m
-XX:PermSize=384m
-XX:MaxPermSize=768m
Eclipse is working perfectly on my machine.
I don't want to use Maven or other build tools to solve dependencies related problem due to
limited internet speed.
Initially I was using STS zip version. Now I installed STS from executable. And it is working fine for me. I required to setup HOME variable, that's all.
Attaching the STS.ini from installed STS (for reference).
-vm
C:\Program Files\Java\jdk1.7.0\bin\javaw.exe
-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.springsource.sts.ide
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx768m
-XX:MaxPermSize=256m
Delete STS.ini file.
then it runs correctly and creates a new STS.ini File Automatically
I had the same problem yesterday morning. After googling, I saw that the following lines in the STS.ini file were missing (orange marked): STS.ini
After adding:
-vm
[full path to the javaw.exe]
everything worked again properly.
HTH
Added line -vm
C:\Program Files\Java\jdk1.8.0_45\bin\javaw.exe at the top of sts.ini and it worked for me
Try running it as administrator.
Right Click --> Run as Administrator.
I'd same issue, On looking at the STS.ini file saw there was double entry of
-vm argument. This error happened to me on updating the STS. Also if it still does not work try running the eclipsec.exe and if that work, then something in ini file is not set correctly.
Make sure your STS and JDK that you provide while initializing STS is compatible. What I mean by this is that if your JDK is 64 bit then you should install 64 bit version of Spring suite (spring-web-4.0.a.RELEASE-installer-x86_64.exe) and not the 32 bit one.
If you are using 32 bit OS, please install 32-bit version of Java 1.8 and similarly 64bit version of java for 64 bit machine.
Also, add below vm configurations to your STS.ini file
-vm
C:\Users\bmeharn\Documents\Softwares\Java8\jdk1.8.0_131\bin\javaw.exe
-startup
plugins/org.eclipse.equinox.launcher_1.4.0.v20161219-1356.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.500.v20170531-1133
-product
org.springsource.sts.ide
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.8
-Xms40m
-Dosgi.module.lock.timeout=10
-Xverify:none
-Dorg.eclipse.swt.browser.IEVersion=10001
-Xmx1200m
There are two different downloaders of the STS IDE. May be you have downloaded 32 bit version instead of 64 bits version. Downloaded zip somehow has win32 in either cases.
Try Below things and this will surely resolve your issue:
Check your OS (32 or 64 bit) and then check STS whether it is compatible with 32 or 64 bit or for both. Now check your jdk (32 or 64 bit)
If step 1 is validated then update javaw.exe path on top in STS.ini as given below. Make sure there are no duplicate entries for this path in STS.ini and path is also correct
-vm
C:\Program Files\Java\jdk1.8.0_191\bin\javaw.exe
Done your STS will surely run, best luck !
Updated -vm properties but still not working. Running sts as Administrator worked for me.
I'm having problems migrating my Java files from Ubuntu to Mac. Mac complains about my use of SwingWorker---it can't find javax.swing.SwingWorker .
In Mac's terminal, doing java -version tells me I have version 1.6.0_03-p3. In Ubuntu, I have 1.6.0_20. Is it that big a difference? How do I upgrade Mac's Java so I can use SwingWorker?
Thanks!
EDIT:
I followed the link at TofuBeer's reply. My eclipse.ini now reads as
-startup
../../../plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
--launcher.library
../../../plugins/org.eclipse.equinox.launcher.cocoa.macosx_1.1.100.v20110502
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vm
/System/Library/Frameworks/JavaVM.framework/Versions/1.6.0/Home/bin/java
-vmargs
-Xms40m
-Xmx512m
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Dorg.eclipse.swt.internal.carbon.smallFonts
I've restarted Eclipse but it still does not recognize SwingWorker. Is there anything wrong with my eclipse.ini? I tried to navigate to the path indicated under -vm. I noticed that in Versions, the folder for 1.6.0 is just a shortcut (not an actual directory). Will that affect anything?
(Barring the fact that the folder 1.6.0 in Versions is just a shortcut, the path indicated does exist.)
It does!
At least on v1.6.0_26, probably wasn't there on 1.6.0_03-p3 try updating your Java version, should be as simple as running Software update:
Are you building at the command line, or in an application such as Eclipse or Netbeans? I'd check that you don't have multiple copies of Java installed, including an older 1.5 version that may not have SwingWorker.
I don't use Eclipse, but take a look here for checking the JDK it is using.