After installing the m2eclipse plug-in, you will always be prompted to restart Eclipse:
11:05:37 A.M.-1-5: Eclipse is running in a JRE, but a JDK is required
Some Maven plugins may not work when importing projects or updating source folders.
There is no problem, but it looks uncomfortable. The solution is as follows: Find the eclipse installation directory. My directory is: C: \ Program Files \ eclipse. Modify eclipse. add one sentence to the INI file:
-VM
C: \ Program Files \ Java \ jdk1.6.0 _ 02 \ bin \ javaw.exe
To solve the problem. Eclipse. ini looks like this before modification:
After modification, it looks like this:
Why do we need to copy an image? The reason is that there are requirements for its location. I will post this document on the Wiki for you to see:
- The-VM option and its value (the path) must be on separate lines.
-VM configuration items and values must be in different rows.
- The value must be the full absolute path to the Java executable, not just to the Java home directory.
The value must be an executable absolute path, rather than the Java home directory.
- The-VM option must occur before the-vmargs option, since everything after-vmargs is passed directly to the JVM.
-The VM configuration item must be prefixed to the-vmargs configuration item because a default JVM is selected for the-vmargs configuration item.
Here, let's talk about the difference between the configured JRE and the workspace JRE? In eclipse. A Java Runtime Environment configured by INI is used to ensure that eclipse can run normally, that is, the JRE configured in windo> perferences> JAVA> installed JRE in eclipse ensures that your workspace can run normally, of course, these two can be different.