The ARCHIVE attribute of the APPLET tag allows one to specify a comma-separated list of files. You could package your applet in a JAR, specify both that file and the zip file in the ARCHIVE attribute and load the text file using getResourceAsStream(), as the text file would be accessible through the class loader at that point. Failing that, you could try to use java.net.URL to download the file and extract the text file on the client. [ May 09, 2007: Message edited by: Joe Ess ]
This is a much cooler approach than the HTTP stuff I suggested the other day. Does this work because the applet classpath includes the jar that holds the file and the browser downloads the jar to satisfy the classpath?
A good question is never answered. It is not a bolt to be tightened into place but a seed to be planted and to bear more seed toward the hope of greening the landscape of the idea. John Ciardi
posted 12 years ago
I'm not sure, but I'm a bit dissapointed now... When I load the page ZIP test it has to 137 files/directories, but it takes much too long.
So annoying, I fixed one aspect by making the applet code flexible so any zip of images can be used, but now it takes too long to load, so its not very user friendly.
I guess its because it has to get the data over a network, and 137 items might take 30 seconds or so...
Is there any way this can be made faster, I'll take a look at the archive thing too.
Your mother was a hamster and your father was a tiny ad: