Search code examples
javajava-web-start

How to detect if INDEX.LIST is used by Web Start?


I'm trying to use the jar indexing cabality of Java to reduce the amount of loaded archives during a web start launch. I've generated the INDEX.LIST with Ant and placed it in the jar file flagged as main (META-INF/INDEX.LIST). My startup class is also in this jar. The main jar is downloaded eagerly, others are fetched lazily on demand.

Only my small main jar gets downloaded until i don't reach out for a resource which can be located in an another archive. If i try to load a property file from an other jar, the web start client downloads a lot of other archives before it finds my resource. (more than 10 Megs instead of ~500KB which was needed). Looks like it's not using the index file at all, just going linearly through the list of jars and tries to find the resource. I've checked the generated INDEX.LIST and it contains the reference to my property file.

How can i detect if Web Start is using my index file at all?


Solution

  • You probably want to use the package element in your JNLP file to list which packages each jar contains. Jar indexes are odd.