Thursday, September 22, 2011

An Apache Ant Problem

  Hi all, today I had a very strange problem. I was trying to make Apache Ant work on my PC, but somehow it was not coming along. The problem was that the JAVA_HOME environment variable was not set correctly. I got the following error message:

  Perhaps JAVA_HOME does not point to the JDK. It is currently set to "C:\Program Files\Java\jre6"

  I spent about 30 minutes trying to figure out what I was doing wrong. After a reboot, several "echo %JAVA_HOME%" commands in the command prompt of Windows 7 and sheer wondering what might have gone wrong I finally realized it. I have set the variable correctly with one minor detail that was preventing Ant from working. I have added a semicolon (;) at its end, thus preventing Ant from finding the "javac" executable file. Hope this post helps someone out there, trying to cope with the same problem.

No comments:

Post a Comment