I've managed to reduce the size even further by recompiling the POI 
library using the "-g:none" option to compile without debugging 
information.
This has reduced the filesize from 340k to 247k.

Thanks very much for your very helpful suggestion.




[EMAIL PROTECTED] 
13/10/2005 10:04
Please respond to
"POI Users List" <[email protected]>


To
"POI Users List" <[email protected]>
cc

Subject
RE: Smaller POI JAR file?






Thanks Shawn. I've managed to reduce the jar size from 784k to 340k. It's 
usable now I think.

I ran my code using the -verbose flag and got a list of classes loaded. I 
then just deleted all the classes not used from the jar file. Works great!

I might try an obfuscator as well. They often reduce the jar size.




"Shawn Laubach" <[EMAIL PROTECTED]> 
13/10/2005 00:01
Please respond to
"POI Users List" <[email protected]>


To
"'POI Users List'" <[email protected]>
cc

Subject
RE: Smaller POI JAR file?






You could run a decent profiler and get a list of classes loaded during a
run.  Those would probably be the ones you need.

Shawn

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 


Sent: Wednesday, October 12, 2005 1:43 AM
To: [email protected]
Subject: Smaller POI JAR file?

I am using POI to create Excel files. Works quite nicely.

My only problem is the size of the POI jar file. I am using 
poi-2.5.1-final-20040804.jar, which is 784kb. For reasons I won't go into, 


I really need a smaller jar file. 

Is there any way I can get a stripped down version of the POI jar with a 
smaller file size? Perhaps one that only includes "core" classes?

All I am doing is creating a spreadsheet, adding some cells, changing some 


font sizes and cell styles, then saving the spreadsheet to a file.

I have tried compiling my application with the POI sources, which 
hopefully would just compile the subset of POI classes my application 
needed. However, this seemed to compile pretty much every class in the poi 


package....

Perhaps I could use an obfuscator to shrink the jar?


_____________________________________________________________________ 
This email message (including any file attachments transmitted with it) is
for the sole use of the individual or entity to whom it is addressed and 
may
contain confidential and privileged information. Any unauthorised review,
use, alteration, disclosure or distribution is prohibited. If you have
received this email in error, please notify the sender by return email and
destroy all copies of the original message.
Any confidentiality or legal professional privilege is not waived or lost 
by
any mistaken delivery of the email.
Opinions, conclusions and other information in this message that do not
relate to the official business of the company shall be understood as
neither given nor endorsed by it.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
Mailing List:     http://jakarta.apache.org/site/mail2.html#poi
The Apache Jakarta Poi Project:  http://jakarta.apache.org/poi/




_____________________________________________________________________ 
This email message (including any file attachments transmitted with it) is 
for the sole use of the individual or entity to whom it is addressed and 
may contain confidential and privileged information. Any unauthorised 
review, use, alteration, disclosure or distribution is prohibited. If you 
have received this email in error, please notify the sender by return 
email and destroy all copies of the original message.
Any confidentiality or legal professional privilege is not waived or lost 
by any mistaken delivery of the email.
Opinions, conclusions and other information in this message that do not 
relate to the official business of the company shall be understood as 
neither given nor endorsed by it.


_____________________________________________________________________ 
This email message (including any file attachments transmitted with it) is for 
the sole use of the individual or entity to whom it is addressed and may 
contain confidential and privileged information. Any unauthorised review, use, 
alteration, disclosure or distribution is prohibited. If you have received this 
email in error, please notify the sender by return email and destroy all copies 
of the original message.
Any confidentiality or legal professional privilege is not waived or lost by 
any mistaken delivery of the email.
Opinions, conclusions and other information in this message that do not relate 
to the official business of the company shall be understood as neither given 
nor endorsed by it.

Reply via email to