Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
322 views
in Technique[技术] by (71.8m points)

maven 2 - m2eclipse: Eclipse is running in a JRE, but a JDK is required

I have a problem with m2eclipse (0.10.0) together with eclipse galileo (Build id: 20090920-1017).

I always get the error message:"Eclipse is running in a JRE, but a JDK is required". I have tried several things, but nothing works. The error message is still there. Here are the things I have tried:

  • In Window>Preferences>Java>Installed JREs I checked JDK1.6.0_20. DOES NOT WORK

  • In Window>Preferences>Java>Installed JREs I removed all JREs. Only the checked JDK1.6.0_20 is still there. DOES NOT WORK

  • In Window>Preferences>Java>Installed JREs>Execution Environments I choosed JavaSE-1.6 and checked JDK1.6.0_20[perfect match]. DOES NOT WORK.

  • In Preferences of the eclipse desktop start icon I added the -vm parameter (C:Programmeeclipse_galileoeclipseeclipse.exe -vm C:ProgrammeJavajdk1.6.0_20in). DOES NOT WORK.

  • I added the clean parameter (C:Programmeeclipse_galileoeclipseeclipse.exe -vm C:ProgrammeJavajdk1.6.0_20in -clean). DOES NOT WORK.

  • I added the -vm parameter to the eclipse.ini file with a carriage return after -vm and C:/Programme/Java/jdk1.6.0_20/bin/javaw.exe in a new line. DOES NOT WORK.

  • After doing all these things I removed the m2eclipse plugin and installed it once again. DOES NOT WORK.

New ideas I have tried:

  • In Preferences of the eclipse desktop start icon I put the executable at the end (C:Programmeeclipse_galileoeclipseeclipse.exe -vm C:ProgrammeJavajdk1.6.0_20injavaw.exe). DOES NOT WORK.

  • I changed in eclipse.ini the slashes to backslashes. DOES NOT WORK.

Here is my eclipse.ini file:

-startup
plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_1.0.200.v20090519
-product
org.eclipse.epp.package.jee.product
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
-vm
C:ProgrammeJavajdk1.6.0_20injavaw.exe
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xms40m
-Xmx512m

Is anyone out there who have other ideas? Any help is appreciated.

Thank You very much. GernoK

question from:https://stackoverflow.com/questions/2921473/m2eclipse-eclipse-is-running-in-a-jre-but-a-jdk-is-required

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

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:javajdkinjavaw.exe

BUT THIS WILL:

-vm
C:javajdkinjavaw.exe

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...