ANT script error after installing newer version of JDK on my system

11,637

Solution 1

After additional hunting around in Eclipse, I found in the ANT view an External Configuration Tools option when right clicking my Ant script name and under the JRE tab is where the setting was. I changed the setting to use the same JRE as the workspace and then all was fine.

Just in case anyone else ran into this same problem I thought it might be helpful to post my findings.

Solution 2

Ant won't mind the new jdk version as long as its name stays unchanged under Preferences / Java / Installed JREs.

Share:
11,637
Melinda
Author by

Melinda

Updated on June 03, 2022

Comments

  • Melinda
    Melinda almost 2 years

    After installing the newer version of the JDK 6 (1.6.0_41) from 1.6.0_37, I went into Eclipse and updated the Installed JREs in the Java section under the preferences menu. I then went into my ANT script to test some changes I made and when I tried to run the ANT script I got this error:

    Specified VM install not found: type Standard VM, name jdk1.6.0_37

    The specified VM is not the jdk1.6.0_41. This has also been updated in the PATH and JAVA_HOME environment variables.

    Any suggestions as to WHERE else to make a change so that ANT sees this?

    Here is the error I'm getting:

    enter image description here

    Thanks.

  • MFARID
    MFARID over 9 years
    THANK YOU! For those who might run into the same problem. Right click on the build file in the ANT preview -> Run as -> External Tools Configurations -> JRE tab, and set it to whatever you want
  • Christopher Schultz
    Christopher Schultz over 7 years
    I changed my configuration to "Run in the same JRE as the workspace" and hopefully this won't happen to me again.
  • yormen
    yormen over 3 years
    Nice this helped