Stripped Jar

View: New views
3 Messages — Rating Filter:   Alert me  

Stripped Jar

by Danilo Tuler-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I'm planning to use GL in a swing applet, but I wonder if I can reduce
the jar size.
I removed the packages related to:
- swt
- migrationkit/swt
- nachocalendar
- jfreechart

It goes from 594Kb to 542Kb. Not good enough.

This is off-topic, but I wonder if it's worth to do this of if java
plugin is smart enough to handle class (down)loading at this level.

Thanks,
Danilo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...


Re: Stripped Jar

by James Lemieux :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Danilo,

   If you're pretty serious about shrinking the size of your jar, you should consider using a tool like ANT's classfileset task:

http://www.publicobject.com/publicobject/2005_12_01_index.html

It will make a minimalist jar by tracing the footprint of your application when starting from a collection of "root classes." It can't see across reflective calls of course, and it may need help with resource files, but it seems to work really well and can dramatically reduce the size of your application's jar.

James

PS: We use this ANT task when creating the GL issuesbrowser demo jar...

On Wed, Apr 30, 2008 at 6:16 AM, Danilo Tuler <tuler@...> wrote:
Hi,

I'm planning to use GL in a swing applet, but I wonder if I can reduce
the jar size.
I removed the packages related to:
- swt
- migrationkit/swt
- nachocalendar
- jfreechart

It goes from 594Kb to 542Kb. Not good enough.

This is off-topic, but I wonder if it's worth to do this of if java
plugin is smart enough to handle class (down)loading at this level.

Thanks,
Danilo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...



Re: Stripped Jar

by Danilo Tuler-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

James,

>    If you're pretty serious about shrinking the size of your jar, you should
> consider using a tool like ANT's classfileset task:

Thanks for the tip.

I'm also considering pack200. GL pack200 jar is just 159Kb.

Danilo

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

LightInTheBox - Buy quality products at wholesale price