File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JNLP and Web Start and the fly likes Pack200 & Lazy download compatible? NoClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Pack200 & Lazy download compatible? NoClassDefFoundError" Watch "Pack200 & Lazy download compatible? NoClassDefFoundError" New topic
Author

Pack200 & Lazy download compatible? NoClassDefFoundError

Jeff Gent
Ranch Hand

Joined: Mar 24, 2011
Posts: 44

So I've been using Lazy downloads for a while now without issue, but I'm needing to reduce my application size. What appears to be a great solution to my problem is Pack200.

I add this to my jnlp file.
<property name="jnlp.packEnabled" value="true"/>

I then .pack.gz all my jar files and all is good, except for what appears to be my "lazy" downloads.
When the application starts, I'm getting a NoClassDefFoundError on those lazy jars. If I remove the download="lazy", all works good.

Can I not have packEnabled and lazy downloads? What's the secret JavaRanch - I know you guys will know. :-)
Jeff Gent
Ranch Hand

Joined: Mar 24, 2011
Posts: 44

Bump - Anyone?
Martin Vajsar
Sheriff

Joined: Aug 22, 2010
Posts: 3433
    
  47

I've done a little search for Pack200 Lazy download webstart and these links that have come out seem interesting:

http://autoplot.org/wiki/images/TS-1319.pdf
http://oss.org.cn/ossdocs/java/se/jdk6/docs/guide/javaws/developersguide/faq.html

However, I don't have any experience with that, and I'm not sure this is relevant to the version you're using. But it might be worth a try.
Jeff Gent
Ranch Hand

Joined: Mar 24, 2011
Posts: 44

I've seen a few things like these documents, even direct jnlp files, that suggest packing and lazy, but I can't get them to work together. They talk about the technologies, but never show you how to do it or discuss any conflicts.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Pack200 & Lazy download compatible? NoClassDefFoundError
 
Similar Threads
NoClassDefFoundError:
NoClassDefFoundError
NoClassDefFoundError
NoClassDefFoundError
NoClassDefFoundError