You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Conor MacNeill <co...@cortexebusiness.com.au> on 2000/08/01 00:30:36 UTC

RE: out of memory javadoc task

>
> At 6:26 PM +0200 7/31/2000, Stefan Bodewig wrote:
> >  >>>>> "t" == tcmits1  <tc...@cs.com> writes:
> >
> >  t> $JAVACMD -J-Xmx128m -Dant.home=${ANT_HOME}
> org.apache.tools.ant.Main $@
> >
> >Ant spawns of a new VM to run javadoc and the memory settings to Ant
> >are not carried over. Try the maxmemory attribute of the javadoc task
> >instead.
>
> So, the javadoc task runs in a separate VM? Why? Javac doesn't, so I
> don't see why javadoc should. Is it because you need to manipulate
> working directories?
>
No,

it is because javadoc calls System.exit(). Itmay be possible to use a loader
and a security manager to avoid that but I don't know if it is worth the
effort.

Conor


Re: JShell, ant and jlink

Posted by James Duncan Davidson <du...@x180.com>.
on 7/31/00 7:55 PM, Patrick Beard at beard@netscape.com wrote:

> Yes, I wrote jlink expressly for this purpose, out of frustration
> with the jar tool. It can merge multiple directories (starting from
> top level of each directory given), .jar files, and individual files
> (at top-level of resulting output file) into a single output .jar
> file. 

Cool. That sounds like a little tool that I've been wanting to write for a
while (the jar merge functionality expressely). Now that I know what JLink
is I'll be looking forward to seeing it in Ant.

.duncan


Re: JShell, ant and jlink

Posted by Patrick Beard <be...@netscape.com>.
At 10:01 PM -0400 7/31/00, Matthew Kuperus Heun wrote:
>Patrick:
>
>It appears that I'm travelling down some paths that you've already 
>tread.  I just signed up on ant-dev and was pleased to find you 
>there.  JShell is looking more and more attractive, and I'm 
>considering moving over to using it, chiefly because of the tools 
>that can be run there.  I have a few questions.
>
>(1)  Have you successfully been using ant in JShell?  Are there some 
>pointers that you could give me for setting that up?  (No ant 
>command is included in the distribution of JShell that I have.)

Yes, I've been hacking a little bit to make ant run smoothly in 
JShell. I'm planning on including a build of ant in the next release 
of JShell. For now,  here's a URL where you can download ant.jxe:

http://www.vmeng.com/beard/JShell/JTools/ant.jxe

>(2) I'm looking for a tool that will merge the contents of a 
>"library" jar file with .class files that I want to put into a jar. 
>Will jlink do this?  Where can I find some details on jlink?

Yes, I wrote jlink expressly for this purpose, out of frustration 
with the jar tool. It can merge multiple directories (starting from 
top level of each directory given), .jar files, and individual files 
(at top-level of resulting output file) into a single output .jar 
file. Here's the usage text:

usage: jlink output input1 ... inputN

All of the sources to JShell are browsable online starting here:

http://www.gjt.org/servlets/JCVSlet/list/gjt/org/jxe

jlink sources are here:

http://www.gjt.org/servlets/JCVSlet/list/gjt/org/jxe/tools/jlink

- Patrick
-- 

// Patrick C. Beard
// Java Runtime Enthusiast -- "Will invoke interfaces for food."
// mailto:beard@netscape.com

JShell, ant and jlink

Posted by Matthew Kuperus Heun <ma...@gaerospace.com>.
Patrick:

It appears that I'm travelling down some paths that you've already 
tread.  I just signed up on ant-dev and was pleased to find you 
there.  JShell is looking more and more attractive, and I'm 
considering moving over to using it, chiefly because of the tools 
that can be run there.  I have a few questions.

(1)  Have you successfully been using ant in JShell?  Are there some 
pointers that you could give me for setting that up?  (No ant command 
is included in the distribution of JShell that I have.)

(2) I'm looking for a tool that will merge the contents of a 
"library" jar file with .class files that I want to put into a jar. 
Will jlink do this?  Where can I find some details on jlink?

Cheers,

Matt





>At 8:30 AM +1000 8/1/00, Conor MacNeill wrote:
>>  > beard@netscape.com wrote:
>>  > So, the javadoc task runs in a separate VM? Why? Javac doesn't, so I
>>>  don't see why javadoc should. Is it because you need to manipulate
>>>  working directories?
>>>
>>No,
>>
>>it is because javadoc calls System.exit(). Itmay be possible to use a loader
>>and a security manager to avoid that but I don't know if it is worth the
>>effort.
>
>JShell disallows that by using a custom version of the System class 
>that it provides via class loader. Ant could probably use the same 
>approach.
>
>- Patrick
>--
>
>// Patrick C. Beard
>// Java Runtime Enthusiast -- "Will invoke interfaces for food."
>// mailto:beard@netscape.com

-- 


--

Matthew Kuperus Heun
Global Aerospace Corporation
+1 (978) 922-7115 (voice & fax)
<http://www.gaerospace.com>
<ma...@gaerospace.com>

RE: out of memory javadoc task

Posted by Patrick Beard <be...@netscape.com>.
At 8:30 AM +1000 8/1/00, Conor MacNeill wrote:
>  > beard@netscape.com wrote:
>  > So, the javadoc task runs in a separate VM? Why? Javac doesn't, so I
>>  don't see why javadoc should. Is it because you need to manipulate
>>  working directories?
>>
>No,
>
>it is because javadoc calls System.exit(). Itmay be possible to use a loader
>and a security manager to avoid that but I don't know if it is worth the
>effort.

JShell disallows that by using a custom version of the System class 
that it provides via class loader. Ant could probably use the same 
approach.

- Patrick
-- 

// Patrick C. Beard
// Java Runtime Enthusiast -- "Will invoke interfaces for food."
// mailto:beard@netscape.com