Remove the annoying red text after installing m2eclipse.

Source: Internet
Author: User

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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.