Eclipse returns error message “Java was started bu

2019-01-03 04:53发布

this is a picture of the error code

I just downloaded and dearchived android SDK for Windows. I`m currently using W8 64x.

19条回答
等我变得足够好
2楼-- · 2019-01-03 05:26

I had this issue recently, but I hadn't changed any java or updated the java version, May be this issue happened because of crash shutdown of the system.

And after reading a couple of answers here I decided to change the java version from 1.6 to 1.7 in the eclipse.ini file.

-vmargs
-Dosgi.requiredJavaVersion=1.6  

After this change the Eclipse started well and it worked. Since I didnt had changed anything i decided to change it back to 1.6 to what it was originally.

Then I started eclipse and guess what it worked. So Looks like in my case just touching/modifiying the eclipse.ini file worked.

I hope this answer is helpful to somebody.

查看更多
▲ chillily
3楼-- · 2019-01-03 05:28

Working combinations of OS, JDK and eclipse bitness.

  • 32-bit OS , 32-bit JDK , 32-bit Eclipse (32-bit only)
  • 64-bit OS , 32-bit JDK , 32-bit Eclipse
  • 64-bit OS , 64-bit JDK , 64bit Eclipse (64-bit only)

Kindly use 1 of the above combinations.

查看更多
虎瘦雄心在
4楼-- · 2019-01-03 05:29

For those of you who tried all the above answers without any success, try lowering your -Xms value. I am required to support an older Eclipse (Weblogic Eclipse 10.3.6) - I had the following .ini on my Windows 7 machine and my Windows Server 2008 R2 Enterprise VM (the Java version below points to a 32-bit Java) that had worked and were working perfectly, respectively.

-vm
C:/Java/Java7/jdk1.7.0_79/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
-showsplash
org.eclipse.platform
--launcher.defaultAction
openFile
-vmargs
-Xms1024m
-Xmx1024m
-XX:MaxPermSize=256m
-Dsun.lang.ClassLoader.allowArraySyntax=true
-Dweblogic.home=C:/Oracle/Middleware/wlserver_10.3

So a 32-bit Java for a 32-bit Eclipse, but still exit code 1. Based on all answers I had seen here, and the only change being a new laptop with Windows 10, the only possible explanation was that the new OS and the Eclipse were disagreeing on something. So I started playing around with each of the values, and it worked when I lowered both Xms and Xmx to 512m. I have a hunch that possibly the new Windows OS is preventing a higher initial heap size based on some run condition (the higher -Xms does work on Windows 10 on all other similar devices I came across) - so any other explanation is welcome. Meanwhile following is the only value I tweaked to successfully launch Eclipse.

-Xms512m 
查看更多
▲ chillily
5楼-- · 2019-01-03 05:31

The error message points to a problem with your Java version. Do you have a JDK installed?

Try adding the following (noting the new line):

/!\ make sure, that the -vm option occurs before the -vmargs command. Everything after -vmargs is passed directly to the JVM.

-vm 
c:/wherever/java/jdk1.6.0_21/jre/bin/server/jvm.dll
-vmargs... 

...to your eclipse.ini file, pointing to the JDK you want to use, and check that the required Java version is at least as new as your JDK. This is the path for a Windows system. More on paths can be found here (scroll down).

If you don't know where the eclipse.ini file is: regularly it is in the folder of your eclipse.exe.

Edit2: @KadoLakatt: the reason why installing the latest Java Version worked for you is because Eclipse checks the standard path for a JVM if it doesn't find a -vm entry (see here). However I'd not recommend that, since you might be wrong guessing the JVM used. If you update Java (automatically?) you might run into problems in your Eclipse wondering what you might have changed. Better set it to a specific folder in your eclipse.ini to be certain.

查看更多
再贱就再见
6楼-- · 2019-01-03 05:31

I had same issue in my windows 7, 64-bit machine. Then I downloaded and installed 64 bit jdk for Java(which includes jre). This solved the issue.

查看更多
Rolldiameter
7楼-- · 2019-01-03 05:32

just to add here...
For the guys those who still couldn't start eclipse due same error, please check eclipse.ini file again and see have you forgot to put M after memory size. For example:

-Xmx1024
or
-Xmx1024MB
or
-Xmx1024 M
or
-Xmx1024 mb
or
-Xmx1024mb

are incorrect, it should be -Xmx1024M. I have been trying different ideas from SOF and from other forums, and in this cut/paste I forgot that I missed M (such a little thing to miss), so I thought I should share. If it works for some of you please up-vote.

查看更多
登录 后发表回答