Hi Simon,
Here's the code used by the <cactus> task to find the tools.jar file:
protected final File getToolsJar()
throws FileNotFoundException
{
String javaHome = System.getProperty("java.home"); // TODO: Fix this as it fails on Max OSX (which doesn't have a // tools.jar file).
File toolsJar = new File(javaHome + "/../lib/tools.jar");
if (!toolsJar.isFile())
{
throw new FileNotFoundException(toolsJar.getAbsolutePath());
}
return toolsJar;
}
So it means it cannot find it in [javahome]/../lib/tools.jar
Do you know where it is for you (i.e. what directory)?
Hmm, does this mean that this works for you in Eclipse?
Obviously this code is quite broken, and was just one of those quick and dirty hacks none of us ever produces ourselves ;-) I think that tools.jar (or whatever classpath entry contains the Java compiler) should normally always be on the Ant classpath. So some type of lookup to find the resource that contains the compiler should do the trick. I'll need to look into the <javac> etc, to see how the Ant folks get the compiler on the classpath of a forked VM.
-chris
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
