> That's not my understanding, but I haven't tested, I have just read Sun > doc : > - INDEX.LIST is only a list of which package is in which jar. It's only > used when trying to find a class, by reading first the jars that contain > the package.
Correct. Sun added the 'index' feature later in order to give the class loader the ability to selectively load classes. If any class from a .jar file is needed then then entire .jar file is pulled down. > - "preloading" is coded in JmolApplet.java (in the default package, not > in org.jmol....), by providing a list of classes to preload. I coded the 'preload' mechanism so that different class files could get loaded in parallel. I was trying to accomplish the following: * avoid the following situation: - first .jar file downloads - execution starts until a non-present class is seen - second .jar file downloads - execution continues until another non-present class is seen - ... * have more than one .jar file being downloaded concurrently in order to help ensure that 100% of the network bandwidth was used. Basically, in some WAN transfers downloading 2 25Mb files is faster than 1 50 Mb file. * I was anticipating new types of functionality (like iso-surface) that were not part of the 'core' functionality and could be put in other .jar files. Overall, I put quite a bit of work into it and was quite proud of it when I finished. But in hindsight I don't know if it actually accomplished very much. It might have been easier just to leave everything in one big .jar file. >> 2) If the jar file is NOT on the list, then that file doesn't load until >> it is needed. But there's a >> catch. What happens is that as soon as one item that has not been loaded >> is requested, then >> all the remaining Jar files are transferred, because JVM has no idea >> which jar file to load. >> > JVM should know in which jar file the class file is because build.xml > adds this information in JmolApplet0.jar (the index="true" parameter for > JmolApplet0.jar). The <indexjars> tag should contain all jars. That's > what creates INDEX.LIST. Correct. That is the purpose of 'jar indexing'. The first .jar file has an index that tells which .jar file holds each of the classes. Miguel ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Jmol-developers mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-developers
