• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to decrease JAR file size ?

 
Ranch Hand
Posts: 38
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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...??
 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic