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

user3362107
  • 279
  • 1
  • 2
  • 8

6 Answers6

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.

Ram
  • 3,092
  • 10
  • 40
  • 56
user4168310
  • 631
  • 1
  • 4
  • 2
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.

Abdullah
  • 9,005
  • 1
  • 23
  • 24
Bashir Dib
  • 188
  • 1
  • 2
  • "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 – Raphael Royer-Rivard Sep 12 '15 at 17:33
  • 8
    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: https://www.eclipse.org/forums/index.php/t/198527/ – E-Riz Oct 06 '15 at 17:36
  • 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) – Jasper Jul 22 '16 at 10:06
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

Tom
  • 16,842
  • 17
  • 45
  • 54
rnyunja
  • 219
  • 3
  • 4
  • 3
    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`). – E-Riz Feb 05 '16 at 01:00
  • 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. – Skystrider Mar 15 '23 at 23:45
  • 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 – Skystrider Mar 16 '23 at 16:13
5

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

user3916928
  • 123
  • 2
  • 13
  • 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... – MasterJoe Oct 23 '18 at 01:09
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!

Justice O.
  • 1,213
  • 12
  • 19
  • 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 – Legofan431 Apr 09 '19 at 07:55
0

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

choco install adoptopenjdk11

Michael S.
  • 589
  • 8
  • 25