22

I recently decided to start trying Android app development, so I downloaded the Java SE Development Kit 8 (x86) for Windows (I got Windows 8 64bit, but my guide recommends getting the 32bit one), the Android SDK, and the Eclipse IDE for Java Developers (x86).

However, my Eclipse won't launch when I double click eclipse.exe! Instead, I get the following error message: eclipse error

I tried adding Java to my Path variable in my Environment variables as suggested in some of the solutions I looked up, but it still doesn't launch properly.

Anyone know what else I can try? Also, if possible, please do not use super-technical vocabulary as I'm new to these kinds of stuff and will not understand you...thank you haha :D

6
  • Use the correct Java version and don't listen to that "guide" anymore. (Use 64 bit versions of Eclipse and the JDK) Commented Sep 2, 2014 at 1:33
  • I think you need to install Java 6 SDK. (Java 1.6 = Java 6) Commented Sep 2, 2014 at 1:40
  • @AndrewT. As far as I know the -Dosgi.requiredJavaVersion argument shows the minimum Java version. JDK8 (or Java 1.8) should work just fine. Commented Sep 2, 2014 at 2:04
  • @Tom Thanks, I stand corrected. Commented Sep 2, 2014 at 2:07
  • I downloaded both the 64bit versions of Java and Eclipse and changed the path variable to the 64bit Java but I'm still getting the same error. Commented Sep 2, 2014 at 4:07

6 Answers 6

63

I had the same issue and was trying to install different versions of JDK: 1.6, 1.7, 1.8.

It didn't help much.

The problem was resolved when I changed PATH variable by removing

C:\ProgramData\Oracle\Java\javapath; 

In command prompt I also ran following commands:

set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_25 set PATH=C:\Program Files\Java\jdk1.8.0_25\bin;%PATH% 

But I think the most important was to remove C:\ProgramData\Oracle\Java\javapath; from the PATH.

Sign up to request clarification or add additional context in comments.

4 Comments

Just for curiosity from how did you come to know about this setting ?
Does not work for me, it also adds a new error "Error: could not find Java SE Runtime Environment."
After removing C:\ProgramData\Oracle\Java\javapath as recommended in this answer, make sure to follow @ryunja's answer and specify the correct JVM in eclipse.ini.
As you suspected, removing ProgramData\Oracle\Java\javapath from the PATH is sometimes enough. It fixed my problems, even without the other edits.
14

I know exactly how to solve your problem. Go to search and put in environment, a prompt will come up and ask you to "Edit environmental variables for your account" click that and a window will pop up. There will be the current paths which are running on the top (you should have your JDK version running, mine is 1.8) and on the bottom part there will be paths to choose from. Select (on the bottom part) the java path and delete it, then click okay. This should work.

If it didn't work, You may also add a new path to the java bin folder which worked for me.

3 Comments

"on the bottom part there will be paths too choose from" There is nothing to choose for me... It is just a bunch of environment variables with path. I can add, edit or delete some, but I can't "choose" them
This is an extraordinarily low-quality answer (although it probably does help some people). Any problems launching Eclipse should first be referred to the authority: eclipse.org/forums/index.php/t/198527
Before giving a poor description of how to navigate through the menus (that is only valid for a specific windows version) you should definite explain what you're doing (i.e. remove a certain value from the path environment variable)
14

Here is an alternative: As described here, make sure that you have the -vm option set in your eclipse.ini file. It must be an absolute path and on 2 separate lines:

-vm <Absolute Path>\javaw.exe 

Save your .ini and relaunch Eclipse

3 Comments

This should be the accepted answer; it's well-documented that you should specify the VM to use in eclipse.ini, specifically to avoid the kind of problem this question is about (interference from a system-level change in PATH).
The wiki link he has "described here" details: "The -vm option must occur after the other Eclipse-specific options (such as -product, --launcher.*, etc), but before the -vmargs option, since everything after -vmargs is passed directly to the JVM." But this wasn't sufficient to solve this issue for me. I'm still trying to fix it.
This worked for me - the KEY was using forward slashes. I was stuck using back slashes. Also, it MUST be above the -vmargs and below everything already above -vmargs. For me pointing to the jvm.dll worked -vm C:/Program Files/Java/jdk1.8.0_321/jre/bin/server/jvm.dll
5

One line answer, remove 'C:\ProgramData\Oracle\Java\javapath;' from your path variable. It will start to work.

1 Comment

It gave new error for me. A Java Runtime Environment (JRE) or Java Development Kit (JDK) must be available in order to run Sts. No Java virtual machine was found after searching the following locations...
3

Most errors with starting eclipse happen due to multiple JRE or JDK version which makes the installer go nuts.

Solution: Go to Control Panel -> Uninstall Programs

If you're running 64-bit java, then uninstall all Java without the 64bit indicator. If 32-bit, then uninstall all that have 64-bit It works like magic!

1 Comment

Though trivial, this was the answer that helped me. Uninstalling all Java-garbage I had lying around and installing a new clean instance, and boom, it instantly worked without needing to configure anyting
0

What worked for me was having installed adoptopenjdk11 using Chocolatey package manager:

choco install adoptopenjdk11

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.