Click here to Skip to main content
15,885,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, i have a big application, i launch my app from the web using a jnlp file, and pack200 to compress it, and download faster. But since my app is getting bigger (about 35-45mb), some times pack200 just hang out, or some times, the jnlp downloader hang out, is there an alternative better to jnlp and pack200?
Posted
Comments
Sergey Alexandrovich Kryukov 17-Jun-13 15:50pm    
If something hangs, this is not because the application is getting bigger, this is because something is screwed up; perhaps just the probability of hanging grows. Any random failure is always hard to debug, and we don't have enough information.
—SA
David Alejandro Garcia Garcia 17-Jun-13 16:09pm    
but, before the application started to grow,this did not happen.

when it finishes downloading works well, or when I put a direct link, I think where the problem is occurring in the pack200, because if i compress the libraries, and only use the jnlp takes much downloading but it not hang out

1 solution

Pack200 and "deflate" are the only ones that are supported in java out-of-the-box. Though you can write a Classloader that reads from other archive format such as BZip2 or 7z (LZMA), it requires to be present in a start-up stub applet, that contains the Classloader, downloads the archive containing main application, loads the classes from it and starts the app.

With Bzip2 or LZMA, you can get a better compression ratio than pack200, upto ~50%

See this[^]

It explains how to load from a jar, but same approach can be used to load from other types of archives too, take a look at Apache's Commons Compress, it has nice support for various archive types.

Good Luck!
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900