Error not a JRE when running maven install

Source: Internet
Author: User

Translated from jingyan.baidu.com/article/c85b7a6464d8be003bac95fb.html

(Linux I directly follow the second step, error resolution)

When you run Maven install with Eclipse,

[ERROR] Unable to locate the Javac Compiler In:d:\program files\java\jre6\. \lib\tools.jar ensure you be using JDK 1.4 or above and not a JRE (the Com.sun.tools.javac.Main class is required) . In most cases you can change the location of your Java installation by setting the JAVA_HOME environment variable.

  1. Set in the Eclipse.ini file

    -VM C:\Program Files\java\jdk1.6.0_21\jre\bin\javaw.exe

    Note To set this line before-startup in the Eclipse.ini file

  2. window-->preferences-->java-->installed JREs: Set path to the path of the JRE

  3. Restart Eclipse

Error not a JRE when running maven install

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.