A warning message appears every time you install Maven:
Eclipse is running in a JRE, but a JDK is required
Some Maven plugins may isn't work when importing projects or updating source folders.
Solve the problem in two steps:
1. Check the JRE that eclipse is using
' Java ', ' Preferences ', ' Window ', ' installed JREs ' determines that the JDK is being used rather than the JRE.
If there is no JDK, a new standard VM is added first.
2. Configure Eclipse.ini
Review the Eclipse configuration file and add the following code:
- -vm
- c:\progra~2 \java\jdk1. 6.0_16\JRE\BIN\JAVAW
Precautions:
1. First row parameter name, second behavior value, cannot be written to the same line
2. For the value of the second row, because no spaces are allowed, use progra~1 or 2 instead of program Files (x86).
If under Program files, use Progra~1, if under x86, use Progra~2
3. The position in the file can not be put to the last (after-vmargs), do not rest assured directly placed in the file, such as:
- -vm
- c:\progra~2 \java\jdk1. 6.0_16\JRE\BIN\JAVAW
- -startup
- .....
- --launcher.defaultaction
- OpenFile
- -vmargs
- -dosgi.requiredjavaversion=1.5
- -xms240m
- -xmx912m
3. Restart Eclipse, warning no longer appears.
Note: Under Win7, the MyEclipse shortcut overrides the Eclipse.ini configuration,
"D:\Program files (x86) \eclipse\eclipse.exe"-VM "D:\Program files (x86) \jre\bin\javaw.exe" in the target, shortcut,-clean
-VM "D:\Program Files (x86) \jre\bin\javaw.exe" Delete or replace-VM "C:\Java\jdk1.6.0_04\jre\bin\javaw.exe", note the space.
Eclipse is running in a JRE, but a JDK was required Some Maven plugins may isn't work when importing projects or updating SOU Rce folders.