My Ant script won’t compile code. It says it doesn’t find a “C:\Program Files\Java\jdk1.6.0_25”. Which is correct, it should be looking for “C:\Program Files\Java\jdk1.6.0_24”
However, I don’t know where it is getting the bad reference from. I seem to have 24 on Java_home and in all my Eclipse settings. Where can it be getting this other reference from? How can I fix it?
Eclipse gets his JAVA_HOME for Ant from the
Project settings > Java Build Path > Libraries > JRE System Librarynot from Windows %JAVA_HOME% environment variable.Normally it uses the default Eclipse JRE setting which should be C:\Program Files\Java\jdk1.6.0_24 in your case.
Maybe some team member altered the project setting to C:\Program Files\Java\jdk1.6.0_25 and made a commit !?
So you have to check the project settings also, because they overwrite the general Eclipse settings.
Did you already run your antfile in Eclipse with debugmode via
Run As Ant Build...andMain Tab > Arguments > -debug > Runto get more information ?Is there some
fork=trueinvolved in your script ?Also put some more diagnostic output in your antfile via :
to get the relevant settings logged.