I was having trouble getting ant to run a JavaDoc task. In particular, when I tried to invoke JavaDoc from Ant, I got the message: JavaDoc failed: java.io.IOException: javadoc: cannot execute I search the Ant FAQ, and the archives of this mailing list to no avail. I was at my wit's end, when I finally found a relevent bug in the Java Bug Parade: http://developer.java.sun.com/developer/bugParade/bugs/4230399.html >The code in the Solaris reference Java virtual machine searches the PATH >in a nonstandard way: as soon as it finds a directory with the same name >as the target command, it aborts with an error message such as >"java: cannot execute". Because the shells do not do this, the root >cause is highly nonobvious. This also appears to be true under Linux. Moving the JDK to the front of my PATH fixed the problem. I thought I'd share my fix here in case anyone else was banging their heads against this one. John Brewer Jera Design XP FAQ: http://www.jera.com/techinfo/xpfaq.html
