ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: Jar file from Verbose Output
Date Tue, 03 Sep 2002 21:07:02 GMT
Sounds a little bit like GenJar which I used once in the past, except GenJar
wouldn't pull in classes from dependent JARs. Your example syntax shown
below though is too simple. You need to run the Java app for real somehow to
how all the classes it uses, so you need all the elements/attributes of
<java>. And even then some functionality could not have been used, and thus
the corresponding classes not loaded, so you would still need to do some
static analysis to pull in these extra classes (maybe making this analysis
optional!?!?). And then, if you 'execute' a jar with Main-Class set, the
output of -verbose:class doesn't say explicitly where the class was loaded
from)... Etc... Lots of little things that makes this not as trivial as it
seems, and tricky to use right/safely.

All that said, used right, it could be useful to someone. Cheers, --DD

-----Original Message-----
From: Magesh Umasankar [] 
Sent: Tuesday, September 03, 2002 3:53 PM
To: Ant Developers List
Subject: Jar file from Verbose Output

I propose to create a task that reads in the output 
of java -verbose:class MyApp (stored in a file)
and create a jar file that contains all the classes
that were loaded to run MyApp.

The use case is described here (though the 
implementation is not quite elegant enough)

Weblogic ships with a verboseToZip utility too,
primarily to create a jar that contains just those
weblogic files that are needed for a remote EJB 
client to run without having to have the huge 
weblogic.jar copied over to the client machine 
as well.

The task's syntax would be:

<verbosetojar srcFile="verbose.txt" 
              <!-- optional --> manifest="">
    <!-- optional -->
        <exclude name="java**"/>

Would such a task be useful?


*  Opportunist: A person who starts taking bath  *
*  if he accidentally falls into a river.        *

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message