Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Feb 2002 22:13:57 -0600
From:      Mcclain Looney <mcclain@looneys.net>
To:        freebsd-java@FreeBSD.ORG
Subject:   Re: class dependencies (Re: What is ant good for?)
Message-ID:  <20020228041352.23D4522522@mail.looneys.net>
In-Reply-To: <sqb8z9ecmv7.wl@kenji.konaka.nowhere.middle.of>
References:  <sqb8z9ecmv7.wl@kenji.konaka.nowhere.middle.of>

next in thread | previous in thread | raw e-mail | index | archive | help

fwiw, for those of you who haven't tried it yet, ant/javac do a pretty good 
job of picking up deps. our 800+ class project generally only compiled the 
files it needed to.  

there are only a few gotchas, like final methods and variables (you must 
recompile all dependent classes), and of course, the venerable "forname" 
loading process.  

Generally, my rule of thumb is, "ant clean" daily at least, always for new 
cvs updates, and always when something is mysteriously out of wack, and of 
course, whenever you notice you are editing something marked final.

as for dep analysis tools, for those of you who want some industrial strength 
analysis and optimization, check out jax from ibm. it's a optimizing 
obfuscator that does things like flatten object heirarchies, removing dead 
code and other voodoo. it used to be free, now it's 1800 bux or something 
like that. mainly used for building fast, small .jar files.

from the site: 

 JAX reads class files, analyzes them, and generates a compressed ZIP file as 
output, following this ordered procedure: 

Removal of dead methods and fields 
Detection of live overridden methods 
Removal of unused classes and interfaces 
Inlining of methods 
Removal of non-essential attributes 
Shortening of internal method names and field names 
Removal of non-used entries in the constant pool 

alphaworks.ibm.com/tech/jax

in my experience, it works really well for stripping out unneeded bloat from 
3rd party jar files you are bundling into your project, though the config 
process is a complete mess (or was).

anyway, i guess my point is, don't poo-pooh ant, it's a pretty good tool.

-mcclain


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-java" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020228041352.23D4522522>