Maven build failed: “Unable to locate the Javac Compiler in: jre or jdk issue”

后端 未结 30 2039
长情又很酷
长情又很酷 2020-11-30 20:33

I have my JAVA_HOME set to:

C:\\Program Files (x86)\\Java\\jdk1.6.0_18

After I run maven ins

30条回答
  •  情话喂你
    2020-11-30 21:12

    If you set the JAVA_HOME, and the problem persists try the following.

    (I had the same problem, on a fresh installed PC.)

    Assuming you are using Eclipse.

    • Open WindowPreferencesJavaInstalled jre's. Remove all you have there, add the desired you want to use (JDK, no JRE!)
    • In the same window open maven - installations, add the Maven installation you downloaded and extracted somewhere. (Do not use the embedded Maven installation. It has some known bugs.)

    That's all. Your project will not suffer from such problems.

提交回复
热议问题