Getting Error running javac.exe compiler message, while using Ant in Eclipse

后端 未结 17 888
旧时难觅i
旧时难觅i 2020-12-24 13:04

When I run my Ant build in Eclipse, I\'m getting the following error message and the Ant build fails.

Error Message: Error running javac.exe compile

17条回答
  •  我在风中等你
    2020-12-24 13:49

    I had the same problem and the issue was, in eclipse java.home was referring to JRE instead of JDK. I changed it and the build was successful. You can do the following to change it to JDK:

    Preferences > Java > Installed JRE's > Add... For 'JRE Type' select 'Standard VM' > Next > Directory: select your JDK directory (instead of JRE) (in my case: C:\Program Files\Java\jdk1.6.0_16 ), press OK.

    Now, you are back at 'Installed JRE's', select the JDK here also.

    The below post helped in finding the solution. JAVA_HOME points to the wrong place

提交回复
热议问题