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

后端 未结 30 1993
长情又很酷
长情又很酷 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:09

    The solution to this problem is very simple...

    If you don't have Ant build file then generate it. In Eclipse you can easily create a Ant file.

    Refer to the link to create Ant build file [http://www.codejava.net/ides/eclipse/how-to-create-ant-build-file-for-existing-java-project-in-eclipse].

    Now follow the given steps:

    1) Add your Ant build file in Ant view that is in view window.

    2) right click on your Ant build file and select Run As and the second option in that "Ant Build".

    3) Now a dialog box will open with various options and tabs.

    4) Select the JRE tab.

    5) You will see three radio buttons and they will be having JRE or JDK selected as an option.

    6) Look carefully if the radio button options are having JRE as selected then change it to JDK.

    7) Click apply.

    That's it...!!!

提交回复
热议问题