• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to decrease JAR file size ?

 
Kamal Trivedi
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We are developing an J2ME based application.
We are using basic J2ME class + J2ME Polish Library(UI) + J2MEDB(DB)
& some images
The jar file size is now 2.0 MB , which is not feasible for some phones.
i.e Some mobiles have restrictions like if JAR file size > 512 KB ,then that application can't be install.
On applying Obfuscation , i got many errors so can't proceed on that point..
Also let me know how to apply obfuscation steps...
I have get to know about Proxy Class.Let me know if this can solve my problem.
Or is there any other solution to decrease jar file size...??
 
Aleksandar Babic
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you are using Netbeans add proguard as obfuscator.
Netbeans has option to choose level of obfuscation. Maybe errors will be fixed with new version of proguard.

For higher compression try kjar
For png you can try OptiPNG & PNGOut
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which errors are you getting?

Which obfuscator are you using? I'd recommend ProGuard (on SourceForge); you do not need any IDE to use it.

I don't understand what the Proxy class has to do with this.
 
Sukitha R Udugamasooriya
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hey Kamal,

Why not delete the thumb file if you are using any images, if your OS is Windows XP or higher.

regards
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic