If have login problems remove cookies and clear browser cache.



Post Reply 
 
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Your mobile maximum Java application size
02-05-2021, 03:56 PM
Post: #6
RE: Your mobile maximum Java application size
(02-04-2021 02:26 AM)JoseskVolpe Wrote:  So i'm trying to limit my UndertaleME project's size under 250Kb, but well, it's getting even harder while its code is increased and i think i'll not be able to make lighter than that lol. Current size is 205Kb

If you are not doing so already, obfuscating the Java classes can yield high size reductions on them. It can strip out lots of debugging information J2ME phones don't make any use of. ProGuard is the most popular tool for doing so (https://github.com/Guardsquare/proguard)
These are the options that usually work for me:
Code:
proguard -libraryjars S40-5th-lib-unified.jar -target 1.4 -keep 'class * extends javax.microedition.midlet.MIDlet' -optimizationpasses 5 -overloadaggressively -repackageclasses '' -allowaccessmodification -microedition -injars input.jar -outjar output.jar
(I've attached the S40-5th-lib-unified.jar. It is from the Nokia SDKs. It contains the library classes for the J2ME APIs)

If you use PNG assets, there's several tools that can try harder at compressing them to further reduce their size, without any quality loss. They can usually save a few kilobytes off big PNGs
https://github.com/fhanau/Efficient-Compression-Tool
https://css-ig.net/pingo (Windows only)
https://trimage.org/ (Linux only)

If you are using MIDI files, old Nokia PC Suite versions had a tool to adapt MIDI files to the phone's capabilities (IE, reduce channels, length, etc) It also haves an "Optimize file size" option that might be of your interest
Nokia PC Suite is very old, you will need an old Windows machine (or virtual one) to run it. Here's the installation disc https://archive.org/details/nokia8800driversdisc
I've tried in Windows XP, and you can install it sucessfully without a phone. When asked for the connection type, just click cancel and it will take you to the main PC Suite screen. Then use the "Make Ringtone" option

Finally, you can try running AdvZip on the final JAR file (https://www.advancemame.it/comp-readme.html). It should shave a few kilobytes more

Hope this is helpful for your project!


Attached File(s)
.jar  S40-5th-lib-unified.jar (Size: 1.01 MB / Downloads: 11)
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Your mobile maximum Java application size - nkzn64 - 02-05-2021 03:56 PM

Forum Jump:


User(s) browsing this thread: 2 Guest(s)