ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Diane Holt <hol...@yahoo.com>
Subject Re: registry JRE vs. JDK with java task
Date Wed, 22 Nov 2000 18:42:56 GMT
I'm not real big on fall-out behaviour -- I prefer things to be explicit.
So, if I don't want runtime libs added (which I don't, and I do have that
turned off for my <javac>), I'd prefer to have the task specifically have
an "addruntime=false" (with the default being true).

I don't currently have my modified Javac.java set up that way, because I
just tweaked it for my own use, and I never want runtime added, so I just
flipped the boolean to false -- but if it becomes a real part of the task,
I think having an attribute to turn it off would be the Right Thing to do.

Diane

--- Michael Krammer <krammer@spotfire.com> wrote:
> On 22 Nov 2000, Stefan Bodewig wrote:
> 
> > Add another option to not add Path.systemClasspath as well and I'll
> > commit them (unless anybody else objects).
> 
> <lurking mode off>
> 
> I've had problems with the way that the Javac task handles the classpath
> for Jikes. I'm running Ant 1.2 with Java 2 SDK 1.2.2, but compiling for
> a
> JDK 1.1 target JVM (the product is an applet). I think it should be
> possible to specify bootclasspath and extdirs attributes to make it
> work.
> However, in addition to these parameters, Ant adds the runtime system
> classpath as well as the runtime value of the "java.ext.dirs" system
> property.
> 
> With this build target I get the classpath argument for jikes listed
> below:
> 
> <property name="build.compiler" value="jikes"/>
> <javac srcdir="D:\Project\src"
>        bootclasspath="D:\Project\lib\classes.zip">
>   <classpath>
>     <pathelement location="D:\Project\lib\junit.jar"/>
>   </classpath>
> </javac>
> 
> D:\Project\lib\classes.zip;
> D:\Programs\jre1.2.2\lib\ext\iiimp.jar;
> D:\Project\lib\junit.jar;
> D:\Project\src;
> D:\Programs\Ant-1.2\lib\ant.jar;
> D:\Programs\Ant-1.2\lib\jaxp.jar;
> D:\Programs\Ant-1.2\lib\parser.jar;
> D:\Programs\jdk1.2.2\lib\tools.jar;
> D:\Programs\jre1.2.2\lib\rt.jar
> 
> What I do want is a classpath containing only these elements:
> 
> D:\Projects\t2\lib\classes.zip;
> D:\Projects\t2\lib\junit.jar;
> D:\Projects\t2\src\product;
> 
> I think that a reasonable behaviour would be to skip the runtime system
> classpath and the paths defined in the "java.ext.dirs" system property
> if
> you specify a bootclasspath attribute. Specifying a bootclasspath but no
> extdirs attribute would result in an empty extdirs path. If you specify
> just an extdirs attribute (but no bootclasspath), it gets added to the
> list of default extdirs read from the "java.ext.dirs" property. If you
> don't specify any of the bootclasspath or extdirs attributes, the
> current
> behaviour seems appropriate.
> 
> This is the way my own hacked Javac task works right now.
> 
> What do you think?
> 
> - Michael
> 
> ----------------------------------------------------------------------
> Michael Krammer           ***  Stop the continental drift NOW!  ***
> email: krammer@spotfire.com     web: http://www.spotfire.com
> Spotfire AB, Första Långgatan 26, SE-413 28 Göteborg, Sweden
> 
> 
> 
> 


=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Mime
View raw message