JWS Lazy downloads question

In my emulator project, all my ROM files are in jars which are marked for lazy downloads. As I understand it, this will cause the ROM only to be downloaded when needed. Now I was wondering: How will JWS know which jar it has to download? Or will it just download all jars which are marked as ‘lazy’ until it finds the correct one?

You assign the lazy jars to groups (can’t remember the technical name off top of head - “parts” ?), so that JWS knows “part A is linked to parts B and C”, for instance.

Not very helpful, I’m afraid, but don’t have all my downloaded JWS refs here at work :(. If you grab the big PDF functional specification for webstart, you’ll find it’s not so much a spec as a manual :). So, go to the java site, find JWS, and get that “spec” (manual) - it’s great, very readable (pity it’s PDF only, instead of something intelligent like HTML).

Yes, I read the spec already. The fact that it says that you can use the jnlp api to programmatically download a jar got me wondering what actually happens when you don’t do that and just mark a jar as lazy because, as far as I can tell, there’s no way that the jws client can know which resource resides in which jar…

Oops, misunderstood a bit there, sorry. Very tired this morning :frowning:

I’m pretty sure you can, somehow - have you looked at the JAR-index features? (may not be described in JWS, in which case have a look at the JAR spec / the JAR-tool docs in the standard javadocs

Doesn’t a jar need to be downloaded first in order to see what’s in it?

Off the top of my head…jar-indexing creates an index alongside the manifest, and then your server keeps a copy of that index outside the JAR available for JWS clients to access.

However, I could be talking compelte rubbish here, conflating concepts from JWS with those from J2EE deployment of JAR’s, so don’t pay too much attention to me :stuck_out_tongue:

erikd, as soon as you figure out what’s actually going on, I’d also like to take advantage of this feature. Let me know if you come across some solid info.

I checked what’s happening now: What seems to be happening is that as soon as a resource is requested which resides in a .jar marked as ‘lazy’, it will simply download all .jar files marked as lazy. I guess I have to download them programmatically.

Is there a way to find out if your lazy stuff is loaded without just asking for a resource inside it and thus forcing it to download immediately?