Use eclipse and Maven in combination-Please make sure the-VM option in eclipse. ini

Source: Internet
Author: User

Install m2eclipse (Maven plug-in) in eclipse)

After installation, the following warning is displayed:

The Maven integration requires that eclipse be running in a JDK, because a number of Maven core plugins are using jars from the JDK.

Please make sure the-VM option in eclipse. INI is pointing to a JDK and verify that installed JRE's are also using JDK instils.

Solution:

(1) set the JDK directory for system installationSet your JDK as a default Java environment in eclipse (default installed JRE)

Open eclipse. Click on 'window'-> 'preferences '-> 'java'-> 'installed jres '.

If you can't find any JDK on the list-> click 'add'-> 'standard VM '-> set all paths and click 'finish '.

After that-check this JDK on the list of installed jres and Click 'OK '.

(2) Add the JDK path to the eclipse. ini file.Add path to your SDK in eclipse. ini

Open 'eclipse. ini 'and add there:-VM path_to_javaw_on_your_machine, so in my example it will be (jdk1.6.0 _ 17 on Windows):-VM
D: // Java/jdk1.6.0 _ 13/JRE/bin/javaw
No space is allowed. Otherwise, use ~ 1, such as: 'program files 'is 'progra ~ 1'. Notice 1:Do not use paths with spaces! Replace all dir names with spaces to their shortcuts. For example: 'program files 'is 'progra ~ 1 ′.
It can be divided into two lines. Notice 2:'-VM' is in the first line, path is in the second line

Your 'eclipse. ini 'looks like this:

-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
-Showsplash
Org. Eclipse. Platform
-- Launcher. xxmaxpermsize
256 m
-VM
D:/Java/jdk1.6.0 _ 13/JRE/bin/javaw
-Vmargs
-Xms40m
-Xmx256m
-VM must be in front of-vmargs. Notice:'-VM' must be "-vmargs" above

Restart eclipse. Restart eclipse and everything shoshould be fine.

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.