If what you want is to reduce the jar size, you could also use Proguard (http://proguard.sourceforge.net/).
Proguard is a Java Code Optimizer/Shrinker/Obfuscator. It's not so straightforward. Actually, there are many parameters that you should configure to achieve the desired result without spoiling the whole jar file. Before trying it, make sure you have some backup copies of the original jar file. A simple configuration usually works for everyone. Still, test all necessary functions after proguarding a jar file.
Here's the quote from their website:
"ProGuard is a free Java class file
shrinker, optimizer, and obfuscator. It can detect and remove unused
classes, fields, methods, and attributes. It can then optimize bytecode
and remove unused instructions. Finally, it can rename the remaining
classes, fields, and methods using short meaningless names. The
resulting jars are smaller and harder to reverse-engineer."
I have personally observed good results in many jar files I usually use. The average reduction rate is about 2/3 (two thirds) of the original size. So, a jar file of 30k usually can be reduced to 20k.
I hope that helps you.
Best regards,
Filipe Fedalto
Brazil
On 25/10/06, Aaron J Weber <[EMAIL PROTECTED]> wrote:
You could try autojar (sourceforge). I've found it works pretty well -- but when you have any automated tool removing classes from existing jars (and combining them with others), you should make sure to regression-test your classes against the resultant-jar very well in case something was missed.-AJ----- Original Message -----From: M.RameshkumarSent: Monday, October 23, 2006 10:18 PMSubject: [iText-questions] Creating Customized JAR file of iText for anApplicationHi,
I want to make a customized jar file (only required files from the iText Library/Source files) for my application. Reason is simply to reduce the size of the library file.
How will I know what are the classes I should add and what to remove? Any suggestion/Tips would be really great.
Basically the features needed to be in Lib file are: PDF Reading, Retrieving Acro Form Fields and Values filled in, Populating Acro-Form-Field values, Printing.
Thanks for your time.
Regards,
Ram
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
