ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen McConnell" <mcconn...@dpml.net>
Subject RE: Javac tasks (when calling from java)
Date Mon, 03 Apr 2006 17:25:12 GMT
 

> -----Original Message-----
> From: Joe Moore [mailto:i_bugsy@yahoo.com] 
> 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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message