You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Paul Hodgetts <pr...@zzyzxtek.com> on 2000/07/14 03:13:42 UTC

javac Task Using Jikes with Large Number of Files

I'm trying to compile a source tree with the javac task.  I have
set  build.compiler=jikes.  The target XML looks like this:

<target name="build_java" depends="init">
   <mkdir dir="${escrow.classes}"/>
   <javac
       srcdir="${escrow.source}"
       destdir="${escrow.classes}"
       includes="com/escrow/**"
       classpath="${build.classpath}"
       debug="on"
   />
</target>

The resulting set of files number 402 source files.  When I run
the build, I get (sorry for the long wrapped lines, but that's
what comes out):

BUILD FAILED

build.xml:50: Error running Jikes compiler
java.io.IOException: CreateProcess: jikes -Xstdout -d 
D:\EscrowSystemV2\classes -classpath 
D:\EscrowSystemV2\classes;D:\EscrowSystemV2\classes;D:\Software\jdk1.2.2\jre 
\lib\rt.jar;D:\Software\jaxp1.0.1\jaxp.jar;D:\Software\jaxp1.0.1\parser.jar; 
D:\Software\javamail-1.1.3\mail.jar;D:\Software\jaf-1.0.1\activation.jar;D:\ 
Software\WebLogic\lib\weblogic451sp9.jar;D:\Software\WebLogic\classes;D:\Sof 
tware\WebLogic\lib\weblogicaux.jar;D:\Software\WebLogic\lib;D:\Software\WebL 
ogic\license;D:\Software\junit3.2\junit.jar;D:\Software\CyberSource\cdkjava1 
2-3300\cdkjava3300.jar;D:\Software\jdk1.2.2\jre\lib\rt.jar;D:\Software\jaxp1 
.0.1\jaxp.jar;D:\Software\jaxp1.0.1\parser.jar;D:\Software\WebLogic\lib\webl 
ogic451sp9.jar;D:\Software\WebLogic\classes;D:\Software\WebLogic\lib\weblogi 
caux.jar;D:\Software\WebLogi
         at java.lang.Win32Process.create(Native Method)
         at java.lang.Win32Process.<init>(Win32Process.java:64)
         at java.lang.Runtime.execInternal(Native Method)
         at java.lang.Runtime.exec(Runtime.java:272)
         at java.lang.Runtime.exec(Runtime.java:219)
         at org.apache.tools.ant.taskdefs.Jikes.compile(Jikes.java:40)
         at org.apache.tools.ant.taskdefs.Javac.doJikesCompile(Javac.java, 
Compiled Code)
         at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java, 
Compiled Code)
         at org.apache.tools.ant.Target.execute(Target.java, Compiled Code)
         at org.apache.tools.ant.Project.runTarget(Project.java:708)
         at org.apache.tools.ant.Project.executeTarget(Project.java, 
Compiled Code)
         at org.apache.tools.ant.Project.executeTargets(Project.java, 
Compiled Code)
         at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
         at org.apache.tools.ant.Main.main(Main.java:107)


I suspect I'm overloading the command line with too much stuff once
all 402 source file names are added.  I can run fine with about 200
source files, but not 400.  Using the JDK compiler works fine with
402 source files, but it's much slower than Jikes.

Is there something I'm doing wrong?  Should I leave off the includes
attribute (I think it's redundant since srcdir point there anyway)?
How can I get less added to the Jikes command line?

I notice I've got double entries in the classpath, probably because
they are in my environment classpath and I feed them in via the
classpath= attribute.  I want to make sure the build uses the correct
classpath, so I want it specified in the build file.  But I need some
classpath just to run ant, and there is a fair amount of duplication.
How do I get round the duplicate classpath entries?

Thanks in advance for any tips, pointers, or ideas.

-Paul


RE: javac Task Using Jikes with Large Number of Files

Posted by Paul Hodgetts <pa...@zzyzxtek.com>.
 > There is an issue (on my todo list) about sending too many compile files to
 > Jikes since it seems to overflow the capabilities of the Runtime.exec
 > system. The limit is something like 300 or 380, I can't remember exactly and
 > its probably system dependent. Try breaking your compile into smaller
 > bundles.

Yep, that's what I did, and it works as long as I keep the bundle
size small enough.

Any ideas on the duplicate classpath entries?  I notice a comment
in Javac.java about needing a way to not use the current classpath.

Thanks much,
-Paul


Re: javac Task Using Jikes with Large Number of Files

Posted by Ken Wood <kw...@i2.com>.
Yes, the explanation you and Conor provide make it obvious.
It's so easy to forget that the javac runs within the existing
JVM...

Paul Hodgetts wrote:

> Ken Wood wrote:
>
>  > I guess I'm still learning the in's and outs....
>  > If Runtime.exe is the problem, how come it
>  > has no trouble stuff sun's javac? I build a project
>  > with 1498 source files, and it never complains...
>
> Javac isn't invoked with Runtime.exec().  Since it is written
> in Java, it is invoked by directly calling the class (that is
> inside tools.jar if I'm not mistaken).  It can take a long
> String in its parameters, so it doesn't run up against the
> limitation of Runtime.exec().  Jikes has to be invoked with
> Runtime.exec() because it is a C++ program distributed as an
> .exe (on Windows at least).
>
> -Paul


Re: javac Task Using Jikes with Large Number of Files

Posted by Paul Hodgetts <pa...@zzyzxtek.com>.
Ken Wood wrote:

 > I guess I'm still learning the in's and outs....
 > If Runtime.exe is the problem, how come it
 > has no trouble stuff sun's javac? I build a project
 > with 1498 source files, and it never complains...

Javac isn't invoked with Runtime.exec().  Since it is written
in Java, it is invoked by directly calling the class (that is
inside tools.jar if I'm not mistaken).  It can take a long
String in its parameters, so it doesn't run up against the
limitation of Runtime.exec().  Jikes has to be invoked with
Runtime.exec() because it is a C++ program distributed as an
.exe (on Windows at least).

-Paul


RE: javac Task Using Jikes with Large Number of Files

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
> -----Original Message-----
> From: Ken Wood [mailto:kwood@i2.com]
> Sent: Friday, 14 July 2000 12:21
> To: ant-dev@jakarta.apache.org
> Subject: Re: javac Task Using Jikes with Large Number of Files
>
>
> I guess I'm still learning the in's and outs....
> If Runtime.exe is the problem, how come it
> has no trouble stuff sun's javac? I build a project
> with 1498 source files, and it never complains...
>

Ant doesn't use Runtime.exec to invoke Javac. Javac is invoked in the same
VM as ant as a class and not in a separate process.



Re: javac Task Using Jikes with Large Number of Files

Posted by Ken Wood <kw...@i2.com>.
I guess I'm still learning the in's and outs....
If Runtime.exe is the problem, how come it
has no trouble stuff sun's javac? I build a project
with 1498 source files, and it never complains...

Conor MacNeill wrote:

> Actually the issue is not Jikes so much as Runtime.exec, I think.
>
> --
> Conor MacNeill
> conor@cortexebusiness.com.au
> Cortex eBusiness
> http://www.cortexebusiness.com.au
>
> > -----Original Message-----
> > From: Ken Wood [mailto:kwood@i2.com]
> > Sent: Friday, 14 July 2000 11:40
> > To: ant-dev@jakarta.apache.org
> > Subject: Re: javac Task Using Jikes with Large Number of Files
> >
> >
> > Seems to me the solution is to gripe to jikes' developers
> > about the problem. If jikes users have to break their
> > build into 'bundles', then they are forced to think and
> > deal with dependencies manually. Kinda defeats the
> > purpose of having Ant handle the dependencies,
> > eh?
> >
> > Conor MacNeill wrote:
> >
> > > There is an issue (on my todo list) about sending too many
> > compile files to
> > > Jikes since it seems to overflow the capabilities of the Runtime.exec
> > > system. The limit is something like 300 or 380, I can't
> > remember exactly and
> > > its probably system dependent. Try breaking your compile into smaller
> > > bundles.
> > >
> > > --
> > > Conor MacNeill
> > > conor@cortexebusiness.com.au
> > > Cortex eBusiness
> > > http://www.cortexebusiness.com.au
> > >
> > > > -----Original Message-----
> > > > From: Paul Hodgetts [mailto:prh@zzyzxtek.com]
> > > > Sent: Friday, 14 July 2000 11:14
> > > > To: ant-dev@jakarta.apache.org
> > > > Subject: javac Task Using Jikes with Large Number of Files
> > > >
> > > >
> > > > I'm trying to compile a source tree with the javac task.  I have
> > > > set  build.compiler=jikes.  The target XML looks like this:
> > > >
> > > > <target name="build_java" depends="init">
> > > >    <mkdir dir="${escrow.classes}"/>
> > > >    <javac
> > > >        srcdir="${escrow.source}"
> > > >        destdir="${escrow.classes}"
> > > >        includes="com/escrow/**"
> > > >        classpath="${build.classpath}"
> > > >        debug="on"
> > > >    />
> > > > </target>
> > > >
> > > > The resulting set of files number 402 source files.  When I run
> > > > the build, I get (sorry for the long wrapped lines, but that's
> > > > what comes out):
> > > >
> > > > BUILD FAILED
> > > >
> > > > build.xml:50: Error running Jikes compiler
> > > > java.io.IOException: CreateProcess: jikes -Xstdout -d
> > > > D:\EscrowSystemV2\classes -classpath
> > > > D:\EscrowSystemV2\classes;D:\EscrowSystemV2\classes;D:\Software\jd
> > > > k1.2.2\jre
> > > > \lib\rt.jar;D:\Software\jaxp1.0.1\jaxp.jar;D:\Software\jaxp1.0.1\p
> > > > arser.jar;
> > > > D:\Software\javamail-1.1.3\mail.jar;D:\Software\jaf-1.0.1\activati
> > > > on.jar;D:\
> > > > Software\WebLogic\lib\weblogic451sp9.jar;D:\Software\WebLogic\clas
> > > > ses;D:\Sof
> > > > tware\WebLogic\lib\weblogicaux.jar;D:\Software\WebLogic\lib;D:\Sof
> > > > tware\WebL
> > > > ogic\license;D:\Software\junit3.2\junit.jar;D:\Software\CyberSourc
> > > > e\cdkjava1
> > > > 2-3300\cdkjava3300.jar;D:\Software\jdk1.2.2\jre\lib\rt.jar;D:\Soft
> > > > ware\jaxp1
> > > > .0.1\jaxp.jar;D:\Software\jaxp1.0.1\parser.jar;D:\Software\WebLogi
> > > > c\lib\webl
> > > > ogic451sp9.jar;D:\Software\WebLogic\classes;D:\Software\WebLogic\l
> > > > ib\weblogi
> > > > caux.jar;D:\Software\WebLogi
> > > >          at java.lang.Win32Process.create(Native Method)
> > > >          at java.lang.Win32Process.<init>(Win32Process.java:64)
> > > >          at java.lang.Runtime.execInternal(Native Method)
> > > >          at java.lang.Runtime.exec(Runtime.java:272)
> > > >          at java.lang.Runtime.exec(Runtime.java:219)
> > > >          at org.apache.tools.ant.taskdefs.Jikes.compile(Jikes.java:40)
> > > >          at
> > > > org.apache.tools.ant.taskdefs.Javac.doJikesCompile(Javac.java,
> > > > Compiled Code)
> > > >          at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java,
> > > > Compiled Code)
> > > >          at org.apache.tools.ant.Target.execute(Target.java,
> > > > Compiled Code)
> > > >          at org.apache.tools.ant.Project.runTarget(Project.java:708)
> > > >          at org.apache.tools.ant.Project.executeTarget(Project.java,
> > > > Compiled Code)
> > > >          at org.apache.tools.ant.Project.executeTargets(Project.java,
> > > > Compiled Code)
> > > >          at org.apache.tools.ant.Main.runBuild(Main.java,
> > Compiled Code)
> > > >          at org.apache.tools.ant.Main.main(Main.java:107)
> > > >
> > > >
> > > > I suspect I'm overloading the command line with too much stuff once
> > > > all 402 source file names are added.  I can run fine with about 200
> > > > source files, but not 400.  Using the JDK compiler works fine with
> > > > 402 source files, but it's much slower than Jikes.
> > > >
> > > > Is there something I'm doing wrong?  Should I leave off the includes
> > > > attribute (I think it's redundant since srcdir point there anyway)?
> > > > How can I get less added to the Jikes command line?
> > > >
> > > > I notice I've got double entries in the classpath, probably because
> > > > they are in my environment classpath and I feed them in via the
> > > > classpath= attribute.  I want to make sure the build uses the correct
> > > > classpath, so I want it specified in the build file.  But I need some
> > > > classpath just to run ant, and there is a fair amount of duplication.
> > > > How do I get round the duplicate classpath entries?
> > > >
> > > > Thanks in advance for any tips, pointers, or ideas.
> > > >
> > > > -Paul
> > > >
> > > >
> >
> >


RE: javac Task Using Jikes with Large Number of Files

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Actually the issue is not Jikes so much as Runtime.exec, I think.


--
Conor MacNeill
conor@cortexebusiness.com.au
Cortex eBusiness
http://www.cortexebusiness.com.au

> -----Original Message-----
> From: Ken Wood [mailto:kwood@i2.com]
> Sent: Friday, 14 July 2000 11:40
> To: ant-dev@jakarta.apache.org
> Subject: Re: javac Task Using Jikes with Large Number of Files
>
>
> Seems to me the solution is to gripe to jikes' developers
> about the problem. If jikes users have to break their
> build into 'bundles', then they are forced to think and
> deal with dependencies manually. Kinda defeats the
> purpose of having Ant handle the dependencies,
> eh?
>
> Conor MacNeill wrote:
>
> > There is an issue (on my todo list) about sending too many
> compile files to
> > Jikes since it seems to overflow the capabilities of the Runtime.exec
> > system. The limit is something like 300 or 380, I can't
> remember exactly and
> > its probably system dependent. Try breaking your compile into smaller
> > bundles.
> >
> > --
> > Conor MacNeill
> > conor@cortexebusiness.com.au
> > Cortex eBusiness
> > http://www.cortexebusiness.com.au
> >
> > > -----Original Message-----
> > > From: Paul Hodgetts [mailto:prh@zzyzxtek.com]
> > > Sent: Friday, 14 July 2000 11:14
> > > To: ant-dev@jakarta.apache.org
> > > Subject: javac Task Using Jikes with Large Number of Files
> > >
> > >
> > > I'm trying to compile a source tree with the javac task.  I have
> > > set  build.compiler=jikes.  The target XML looks like this:
> > >
> > > <target name="build_java" depends="init">
> > >    <mkdir dir="${escrow.classes}"/>
> > >    <javac
> > >        srcdir="${escrow.source}"
> > >        destdir="${escrow.classes}"
> > >        includes="com/escrow/**"
> > >        classpath="${build.classpath}"
> > >        debug="on"
> > >    />
> > > </target>
> > >
> > > The resulting set of files number 402 source files.  When I run
> > > the build, I get (sorry for the long wrapped lines, but that's
> > > what comes out):
> > >
> > > BUILD FAILED
> > >
> > > build.xml:50: Error running Jikes compiler
> > > java.io.IOException: CreateProcess: jikes -Xstdout -d
> > > D:\EscrowSystemV2\classes -classpath
> > > D:\EscrowSystemV2\classes;D:\EscrowSystemV2\classes;D:\Software\jd
> > > k1.2.2\jre
> > > \lib\rt.jar;D:\Software\jaxp1.0.1\jaxp.jar;D:\Software\jaxp1.0.1\p
> > > arser.jar;
> > > D:\Software\javamail-1.1.3\mail.jar;D:\Software\jaf-1.0.1\activati
> > > on.jar;D:\
> > > Software\WebLogic\lib\weblogic451sp9.jar;D:\Software\WebLogic\clas
> > > ses;D:\Sof
> > > tware\WebLogic\lib\weblogicaux.jar;D:\Software\WebLogic\lib;D:\Sof
> > > tware\WebL
> > > ogic\license;D:\Software\junit3.2\junit.jar;D:\Software\CyberSourc
> > > e\cdkjava1
> > > 2-3300\cdkjava3300.jar;D:\Software\jdk1.2.2\jre\lib\rt.jar;D:\Soft
> > > ware\jaxp1
> > > .0.1\jaxp.jar;D:\Software\jaxp1.0.1\parser.jar;D:\Software\WebLogi
> > > c\lib\webl
> > > ogic451sp9.jar;D:\Software\WebLogic\classes;D:\Software\WebLogic\l
> > > ib\weblogi
> > > caux.jar;D:\Software\WebLogi
> > >          at java.lang.Win32Process.create(Native Method)
> > >          at java.lang.Win32Process.<init>(Win32Process.java:64)
> > >          at java.lang.Runtime.execInternal(Native Method)
> > >          at java.lang.Runtime.exec(Runtime.java:272)
> > >          at java.lang.Runtime.exec(Runtime.java:219)
> > >          at org.apache.tools.ant.taskdefs.Jikes.compile(Jikes.java:40)
> > >          at
> > > org.apache.tools.ant.taskdefs.Javac.doJikesCompile(Javac.java,
> > > Compiled Code)
> > >          at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java,
> > > Compiled Code)
> > >          at org.apache.tools.ant.Target.execute(Target.java,
> > > Compiled Code)
> > >          at org.apache.tools.ant.Project.runTarget(Project.java:708)
> > >          at org.apache.tools.ant.Project.executeTarget(Project.java,
> > > Compiled Code)
> > >          at org.apache.tools.ant.Project.executeTargets(Project.java,
> > > Compiled Code)
> > >          at org.apache.tools.ant.Main.runBuild(Main.java,
> Compiled Code)
> > >          at org.apache.tools.ant.Main.main(Main.java:107)
> > >
> > >
> > > I suspect I'm overloading the command line with too much stuff once
> > > all 402 source file names are added.  I can run fine with about 200
> > > source files, but not 400.  Using the JDK compiler works fine with
> > > 402 source files, but it's much slower than Jikes.
> > >
> > > Is there something I'm doing wrong?  Should I leave off the includes
> > > attribute (I think it's redundant since srcdir point there anyway)?
> > > How can I get less added to the Jikes command line?
> > >
> > > I notice I've got double entries in the classpath, probably because
> > > they are in my environment classpath and I feed them in via the
> > > classpath= attribute.  I want to make sure the build uses the correct
> > > classpath, so I want it specified in the build file.  But I need some
> > > classpath just to run ant, and there is a fair amount of duplication.
> > > How do I get round the duplicate classpath entries?
> > >
> > > Thanks in advance for any tips, pointers, or ideas.
> > >
> > > -Paul
> > >
> > >
>
>


Re: javac Task Using Jikes with Large Number of Files

Posted by Ken Wood <kw...@i2.com>.
Seems to me the solution is to gripe to jikes' developers
about the problem. If jikes users have to break their
build into 'bundles', then they are forced to think and
deal with dependencies manually. Kinda defeats the
purpose of having Ant handle the dependencies,
eh?

Conor MacNeill wrote:

> There is an issue (on my todo list) about sending too many compile files to
> Jikes since it seems to overflow the capabilities of the Runtime.exec
> system. The limit is something like 300 or 380, I can't remember exactly and
> its probably system dependent. Try breaking your compile into smaller
> bundles.
>
> --
> Conor MacNeill
> conor@cortexebusiness.com.au
> Cortex eBusiness
> http://www.cortexebusiness.com.au
>
> > -----Original Message-----
> > From: Paul Hodgetts [mailto:prh@zzyzxtek.com]
> > Sent: Friday, 14 July 2000 11:14
> > To: ant-dev@jakarta.apache.org
> > Subject: javac Task Using Jikes with Large Number of Files
> >
> >
> > I'm trying to compile a source tree with the javac task.  I have
> > set  build.compiler=jikes.  The target XML looks like this:
> >
> > <target name="build_java" depends="init">
> >    <mkdir dir="${escrow.classes}"/>
> >    <javac
> >        srcdir="${escrow.source}"
> >        destdir="${escrow.classes}"
> >        includes="com/escrow/**"
> >        classpath="${build.classpath}"
> >        debug="on"
> >    />
> > </target>
> >
> > The resulting set of files number 402 source files.  When I run
> > the build, I get (sorry for the long wrapped lines, but that's
> > what comes out):
> >
> > BUILD FAILED
> >
> > build.xml:50: Error running Jikes compiler
> > java.io.IOException: CreateProcess: jikes -Xstdout -d
> > D:\EscrowSystemV2\classes -classpath
> > D:\EscrowSystemV2\classes;D:\EscrowSystemV2\classes;D:\Software\jd
> > k1.2.2\jre
> > \lib\rt.jar;D:\Software\jaxp1.0.1\jaxp.jar;D:\Software\jaxp1.0.1\p
> > arser.jar;
> > D:\Software\javamail-1.1.3\mail.jar;D:\Software\jaf-1.0.1\activati
> > on.jar;D:\
> > Software\WebLogic\lib\weblogic451sp9.jar;D:\Software\WebLogic\clas
> > ses;D:\Sof
> > tware\WebLogic\lib\weblogicaux.jar;D:\Software\WebLogic\lib;D:\Sof
> > tware\WebL
> > ogic\license;D:\Software\junit3.2\junit.jar;D:\Software\CyberSourc
> > e\cdkjava1
> > 2-3300\cdkjava3300.jar;D:\Software\jdk1.2.2\jre\lib\rt.jar;D:\Soft
> > ware\jaxp1
> > .0.1\jaxp.jar;D:\Software\jaxp1.0.1\parser.jar;D:\Software\WebLogi
> > c\lib\webl
> > ogic451sp9.jar;D:\Software\WebLogic\classes;D:\Software\WebLogic\l
> > ib\weblogi
> > caux.jar;D:\Software\WebLogi
> >          at java.lang.Win32Process.create(Native Method)
> >          at java.lang.Win32Process.<init>(Win32Process.java:64)
> >          at java.lang.Runtime.execInternal(Native Method)
> >          at java.lang.Runtime.exec(Runtime.java:272)
> >          at java.lang.Runtime.exec(Runtime.java:219)
> >          at org.apache.tools.ant.taskdefs.Jikes.compile(Jikes.java:40)
> >          at
> > org.apache.tools.ant.taskdefs.Javac.doJikesCompile(Javac.java,
> > Compiled Code)
> >          at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java,
> > Compiled Code)
> >          at org.apache.tools.ant.Target.execute(Target.java,
> > Compiled Code)
> >          at org.apache.tools.ant.Project.runTarget(Project.java:708)
> >          at org.apache.tools.ant.Project.executeTarget(Project.java,
> > Compiled Code)
> >          at org.apache.tools.ant.Project.executeTargets(Project.java,
> > Compiled Code)
> >          at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
> >          at org.apache.tools.ant.Main.main(Main.java:107)
> >
> >
> > I suspect I'm overloading the command line with too much stuff once
> > all 402 source file names are added.  I can run fine with about 200
> > source files, but not 400.  Using the JDK compiler works fine with
> > 402 source files, but it's much slower than Jikes.
> >
> > Is there something I'm doing wrong?  Should I leave off the includes
> > attribute (I think it's redundant since srcdir point there anyway)?
> > How can I get less added to the Jikes command line?
> >
> > I notice I've got double entries in the classpath, probably because
> > they are in my environment classpath and I feed them in via the
> > classpath= attribute.  I want to make sure the build uses the correct
> > classpath, so I want it specified in the build file.  But I need some
> > classpath just to run ant, and there is a fair amount of duplication.
> > How do I get round the duplicate classpath entries?
> >
> > Thanks in advance for any tips, pointers, or ideas.
> >
> > -Paul
> >
> >


RE: javac Task Using Jikes with Large Number of Files

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
There is an issue (on my todo list) about sending too many compile files to
Jikes since it seems to overflow the capabilities of the Runtime.exec
system. The limit is something like 300 or 380, I can't remember exactly and
its probably system dependent. Try breaking your compile into smaller
bundles.

--
Conor MacNeill
conor@cortexebusiness.com.au
Cortex eBusiness
http://www.cortexebusiness.com.au

> -----Original Message-----
> From: Paul Hodgetts [mailto:prh@zzyzxtek.com]
> Sent: Friday, 14 July 2000 11:14
> To: ant-dev@jakarta.apache.org
> Subject: javac Task Using Jikes with Large Number of Files
>
>
> I'm trying to compile a source tree with the javac task.  I have
> set  build.compiler=jikes.  The target XML looks like this:
>
> <target name="build_java" depends="init">
>    <mkdir dir="${escrow.classes}"/>
>    <javac
>        srcdir="${escrow.source}"
>        destdir="${escrow.classes}"
>        includes="com/escrow/**"
>        classpath="${build.classpath}"
>        debug="on"
>    />
> </target>
>
> The resulting set of files number 402 source files.  When I run
> the build, I get (sorry for the long wrapped lines, but that's
> what comes out):
>
> BUILD FAILED
>
> build.xml:50: Error running Jikes compiler
> java.io.IOException: CreateProcess: jikes -Xstdout -d
> D:\EscrowSystemV2\classes -classpath
> D:\EscrowSystemV2\classes;D:\EscrowSystemV2\classes;D:\Software\jd
> k1.2.2\jre
> \lib\rt.jar;D:\Software\jaxp1.0.1\jaxp.jar;D:\Software\jaxp1.0.1\p
> arser.jar;
> D:\Software\javamail-1.1.3\mail.jar;D:\Software\jaf-1.0.1\activati
> on.jar;D:\
> Software\WebLogic\lib\weblogic451sp9.jar;D:\Software\WebLogic\clas
> ses;D:\Sof
> tware\WebLogic\lib\weblogicaux.jar;D:\Software\WebLogic\lib;D:\Sof
> tware\WebL
> ogic\license;D:\Software\junit3.2\junit.jar;D:\Software\CyberSourc
> e\cdkjava1
> 2-3300\cdkjava3300.jar;D:\Software\jdk1.2.2\jre\lib\rt.jar;D:\Soft
> ware\jaxp1
> .0.1\jaxp.jar;D:\Software\jaxp1.0.1\parser.jar;D:\Software\WebLogi
> c\lib\webl
> ogic451sp9.jar;D:\Software\WebLogic\classes;D:\Software\WebLogic\l
> ib\weblogi
> caux.jar;D:\Software\WebLogi
>          at java.lang.Win32Process.create(Native Method)
>          at java.lang.Win32Process.<init>(Win32Process.java:64)
>          at java.lang.Runtime.execInternal(Native Method)
>          at java.lang.Runtime.exec(Runtime.java:272)
>          at java.lang.Runtime.exec(Runtime.java:219)
>          at org.apache.tools.ant.taskdefs.Jikes.compile(Jikes.java:40)
>          at
> org.apache.tools.ant.taskdefs.Javac.doJikesCompile(Javac.java,
> Compiled Code)
>          at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java,
> Compiled Code)
>          at org.apache.tools.ant.Target.execute(Target.java,
> Compiled Code)
>          at org.apache.tools.ant.Project.runTarget(Project.java:708)
>          at org.apache.tools.ant.Project.executeTarget(Project.java,
> Compiled Code)
>          at org.apache.tools.ant.Project.executeTargets(Project.java,
> Compiled Code)
>          at org.apache.tools.ant.Main.runBuild(Main.java, Compiled Code)
>          at org.apache.tools.ant.Main.main(Main.java:107)
>
>
> I suspect I'm overloading the command line with too much stuff once
> all 402 source file names are added.  I can run fine with about 200
> source files, but not 400.  Using the JDK compiler works fine with
> 402 source files, but it's much slower than Jikes.
>
> Is there something I'm doing wrong?  Should I leave off the includes
> attribute (I think it's redundant since srcdir point there anyway)?
> How can I get less added to the Jikes command line?
>
> I notice I've got double entries in the classpath, probably because
> they are in my environment classpath and I feed them in via the
> classpath= attribute.  I want to make sure the build uses the correct
> classpath, so I want it specified in the build file.  But I need some
> classpath just to run ant, and there is a fair amount of duplication.
> How do I get round the duplicate classpath entries?
>
> Thanks in advance for any tips, pointers, or ideas.
>
> -Paul
>
>