Ant “JAVA_HOME does not point to the JDK” - but it does

前端 未结 6 852
终归单人心
终归单人心 2020-12-31 01:23

I cannot run my Ant build.xml since I updated to java 1.7.0_52 (or there about). I have been running it for years through Eclipse locally on my Windows 7 laptop - but with t

6条回答
  •  温柔的废话
    2020-12-31 01:48

    I was having the same message when running ANT through Eclipse.

    What worked for me:

    1. In Eclipse, access the menu: "Window -> Preferences";
    2. Access "Ant -> Runtime", at the tree;
    3. Access the Classpath tab;
    4. Expand the "Global Entries" item;
    5. Inside Global Entries, the path to tools.jar was wrong. It was pointing to an older version of Java;
    6. I removed the wrong entry and added the correct one with "Add External Jars" button. It worked.

    enter image description here

提交回复
热议问题