Export all classes in call graph?
- From: rm888@xxxxxxxxx (Robert Mischke)
- Date: Wed, 15 Jun 2005 19:43:50 GMT
I've come across this problem several times: What tools can I use to
extract all class files that are in the call graph of my main method,
or of a given set of files?
Example 1:
Imagine an application with all its classes in com.foo.app.* . Some of
these classes import classes from com.foo.lib.* . Now I want to export
all classes from com.foo.app.* and com.foo.lib.* that are imported
directly or indirectly by my (specified) main class (say
com.foo.app.Main).
Somehow I expect this to be a standard task, but haven't found support
for it yet. On the other hand, I don't see any theoretical problems
with this, so I wonder how this can be done.
Example 2:
I want to build a standalone JFace application. Unfortunately, since
Eclipse 3.0, there are some dependencies to consider: runtime.jar,
osgi.jar and core.jar. I now want to compress these into a jar that
contains all classes of JFace (easy) and all indirectly referenced
classes from the other jars (the tricky part).
I already tried to achieve this with ProGuard obfuscator (with
-dontobfuscate, -keep *, etc), but didn't get a result that I could
compile an application against; there were always some methods and
classes missing that some class needed. I might finally get this to
work, but somehow it feels like a clumsy way to go. Isn't there a
better way to do this?
Thanks,
Robert
.
- Follow-Ups:
- Re: Export all classes in call graph?
- From: bugbear
- Re: Export all classes in call graph?
- From: Robert Mischke
- Re: Export all classes in call graph?
- From: Lucy
- Re: Export all classes in call graph?
- From: Filip Larsen
- Re: Export all classes in call graph?
- Prev by Date: Re: Better Java error messages
- Next by Date: Re: Equivalent functionality to Thread.stop()?
- Previous by thread: [HELP] <GC: Reduced max java heap size to .... bytes due to memory contraints> ]
- Next by thread: Re: Export all classes in call graph?
- Index(es):
Relevant Pages
|