there is something called a ‘context’, which I tried to show in my example…
UPDATE!
I have made a new version which fixes some bugs (but introduces others due to feature creep ).
Major addition is the ability to automatically make embedded pack200 self executing JAR files. This will on average give you between 50-100 extra bytes ON TOP OF any bytes gained using the 4KJO tool.
To use run the EmbeddedPack200.jar with no command line parameters to get help. IMPORTANT NOTE since it is a very brittle tool you may have to launch the jar from the same directory where you have extracted all the files to.
Also, it is best to steer clear of the JShrink option in the 4KJO tool as it has not been correctly implemented.
The new version can be found at:
http://www.sharebigfile.com/file/55424/4KJO-7z.html
You may need 7-zip or the latest version on winrar to extract the archive.
Let me know if you have any trouble using the new tool.
Some other notes:
You will need to remove the main method from your main class when using the EmbeddedPack200 tool.
Not all projects will benefit from this tool. e.g my previous j4k entry (java rally racer 4k) gained 100 bytes, while the Starship Invaders entry saved 59 bytes. Your project may likewise not recieve any benefit from the tool.
The previous version took my JAR, and reduced it to 3937 bytes (and threw a bunch or errors)
The current version only manages 4068 bytes…
hmm…
what was the original size of the input JAR?
Do both version produce a working JAR?
would you be able to post your input JAR so I can fead it through the system to see what is going on?