2

After installed m2eclipse, I received a message saying that Eclipse needs to "run in a JDK" and to update the eclipse.ini to do so.

So I added this:

-vm
C:\Program Files (x86)\Java\jdk1.6.0_20

as the last two lines of the eclipse.ini file in my Eclipse installation directory.

However, I am again receiving this warning.

Did I not enter the command correctly?

Pascal Thivent
  • 562,542
  • 136
  • 1,062
  • 1,124
Chris Collins
  • 3,440
  • 5
  • 27
  • 24
  • 1
    You might find a hint here : http://stackoverflow.com/questions/3317402/eclipse-maven-plugin-configuration-problem/3317501#3317501 The newline in eclipse.ini might cause problems and that would result in Eclipse using a different VM. – Vineet Reynolds Aug 21 '10 at 18:37

4 Answers4

5

The value must be the full absolute path to the Java executable, not just to the Java home directory.

-vm
C:\Program Files (x86)\Java\jdk1.6.0_20\bin\javaw.exe

should work. source: http://wiki.eclipse.org/Eclipse.ini

Raoul Duke
  • 4,241
  • 2
  • 23
  • 18
0

It can be path to JDK if you're using command line. I usually create a shortcut to eclipse with extra parameter: -vm "path_to_jdk", it'll using jvm.dll(jvm.so) instead of java.exe,javaw.exe, so you won't see external process name java.exe in your process list.

secmask
  • 7,649
  • 5
  • 35
  • 52
0

Unbelievable, the solution to this problem has nothing to do with slashes, backslashes, quotes, spaces, jre, jdk, jvm, javaw, ....

The answer is that you have to have a line break between

-vm

and the path.

So in the eclipse.ini file:

THIS WILL NOT WORK:
-vm C:\java\jdk\bin\javaw.exe

BUT THIS WILL:
-vm
C:\java\jdk\bin\javaw.exe
aalku
  • 2,860
  • 2
  • 23
  • 44
Jeremy Goodell
  • 18,225
  • 5
  • 35
  • 52
0

After trying all the suggestions in this thread, the only thing I could to work with Eclipse Indigo was using a shortcut with the -vm switch on the end like this:

"C:\Program Files\Eclipse Indigo 3.7M6\eclipse.exe" -vm C:\Progra~1\Java\jdk1.7.0\bin\
SamWest
  • 132
  • 1
  • 8