Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: Java Compression
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 17-Jun-13 10:40am
Comments
Sergey Alexandrovich Kryukov at 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 at 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

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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!
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 386
1 Marcin Kozub 225
2 Sergey Alexandrovich Kryukov 215
3 Maciej Los 169
4 /\jmot 169
0 OriginalGriff 8,289
1 Sergey Alexandrovich Kryukov 7,407
2 DamithSL 5,624
3 Maciej Los 4,989
4 Manas Bhardwaj 4,986


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 21 Jun 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100