Skip to main content



      Home
Home » Newcomers » Newcomers » Listing classes loaded by application.
Listing classes loaded by application. [message #242534] Fri, 07 December 2007 20:05 Go to next message
Eclipse UserFriend
Originally posted by: mail.cvkimball.com

My application requires classes from two large archives. I'll bet it uses
less than 10% of the classes in the archives. What tool or plugin do you
recommend to track which classes are actually loaded by the application,
so that I can prune the archives to reduce the application size?
Re: Listing classes loaded by application. [message #242762 is a reply to message #242534] Tue, 11 December 2007 03:39 Go to previous messageGo to next message
Eclipse UserFriend
Chris,

> My application requires classes from two large archives. I'll bet it
> uses less than 10% of the classes in the archives. What tool or plugin
> do you recommend to track which classes are actually loaded by the
> application, so that I can prune the archives to reduce the application
> size?
>

Here's a simple idea that may work for you: temporarily delete these
archives (or remove them from the project/compiler classpath), compile
your application and use the compiler error messages to find the classes
that are required by your code.

Note that this technique will work only for dependent classes known at
compile time (i.e., classes imported by your code). If your code uses
reflection to load other classes, then these will not be detected by the
compiler and you may get runtime errors.

My 2 cents...
Asaf

--
Asaf Yaffe
Eclipse TPTP Committer, JVMTI Profiler
Re: Listing classes loaded by application. [message #242863 is a reply to message #242534] Tue, 11 December 2007 20:34 Go to previous message
Eclipse UserFriend
Originally posted by: wegener.cboenospam.com

Chris Kimball wrote:
> My application requires classes from two large archives. I'll bet it
> uses less than 10% of the classes in the archives. What tool or plugin
> do you recommend to track which classes are actually loaded by the
> application, so that I can prune the archives to reduce the application
> size?
>
You can use verbose:class mode for the Java VM to get a list of all
classes loaded.
Previous Topic:restircting the output of CTRL+SHIFT+R
Next Topic:Eclipse for Remote Debugging ?
Goto Forum:
  


Current Time: Sat Jul 19 08:51:49 EDT 2025

Powered by FUDForum. Page generated in 0.07930 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top