Return-Path: Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 17940 invoked from network); 4 Dec 2000 17:51:22 -0000 Received: from h50s48a140n47.user.nortelnetworks.com (HELO zrtps06s.us.nortel.com) (47.140.48.50) by locus.apache.org with SMTP; 4 Dec 2000 17:51:22 -0000 Received: from zrtpd004.us.nortel.com by zrtps06s.us.nortel.com; Mon, 4 Dec 2000 12:10:08 -0500 Received: by zrtpd004.us.nortel.com with Internet Mail Service (5.5.2652.35) id ; Mon, 4 Dec 2000 12:06:20 -0500 Message-ID: <6DDA62170439D31185750000F80826AC0498FB82@zmerd004.ca.nortel.com> From: "Jay Glanville" To: "Ant-User (text)" Subject: RE: Having a problem with the classpath passed to task Date: Mon, 4 Dec 2000 12:06:14 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2652.35) Content-Type: text/plain; charset="iso-8859-1" X-Orig: X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N > -----Original Message----- > From: Stefan Bodewig [mailto:bodewig@apache.org] > Sent: Monday, December 04, 2000 9:43 AM > To: ant-user@jakarta.apache.org > Subject: Re: Having a problem with the classpath passed to > task > > > Jay Glanville wrote: > > > I am trying to compile my source code to a target 1.1 VM. The > > compilers I like to use are Jikes and javac 1.3. My problem is that > > when I use the task in conjunction with a 1.3 runtime > > environment, the tools.jar file gets included in the classpath if > > I'm using the modern compiler, and tools.jar and rt.jar if I'm using > > the jikes compiler. This is the major reason that I cannot use Ant > > in my build environment. > > This is a known problem and you'll probably have attributes in > to suppress this behavior in Ant 1.3. Just out of couriosity, what is the proposed timeframe for release 1.3? > > Is there anything I can do to solve this problem (excluding having > > to use a task) ? > > As a workaround, write your own implementation of Javac, a very simple > and untested idea: > > public class MaJavac extends Javac { > protected Path getCompileClasspath(boolean addRuntime) { > return super.getCompileClasspath(false); > } > > This will suppress rt.jar even when compiling with Jikes. You can copy > what Javac's getCompileClasspath does and omit the line > > classpath.addExisting(Path.systemClasspath); > > to get rid of tools.jar as well. > > At the top of your buildfile say > > > > and you are done. > > > While I'm on the subject of unwanted stuff in the classpath, is > > there any way that I can get rid of the ant libraries? I know that > > there is very little chance of namespace collisions, or any other > > worries. But it would be nice to simply have the following as an > > execution line: jikes -d F:\test\classes -classpath > > C:\jdk\1.1.8\lib\classes.zip;F:\test\classes;F:\test\src > > Yes, the second option above (omitting Path.systemClasspath) should do > that as well. > > You could as well add options to (1) omit the runtime libraries and > (2) omit the CLASSPATH Ant has been invoked with to Javac, make the > modifications necessary to getCompileClasspath and contribute the > patch so you will see this feature in CVS sooner 8-). I've just been reading over the ant-dev lists, and it appears that Diane might have already made the changes (just not submitted them). Is that the case Diane? Baring that, I will seriously consider it. > > Stefan > Thanks. Jay PS: I'm just going to repost my previous PS again, incase you know the answer of the top of your head: How do I set the value of an attribut to be "" (two double quotes)? I've tried extdirs="\"\"", but that didn't work.