> -----Original Message----- > From: Joe Moore [mailto:[EMAIL PROTECTED] > Sent: Tuesday, 4 April 2006 2:40 AM > To: Ant Users List > Subject: Re: Javac tasks (when calling from java) > > I've noticed that with Java 5, when you install it it > installs the JDK in a separate folde than the SDK I think it > used to be a subfolder of the SDK but is now its own separate > folder. This then puts the tools.jar in the SDK and outside > the CLASSPATH.
The following logic works for me under both 1.4 and 1.5: File jre = new File( System.getProperty( "java.home" ) ); File jdk = jre.getParentFile(); File lib = new File( jdk, "lib" ); File tools = new File( lib, "tools.jar" ); /Steve. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]