• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

Java newbie troubles

Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I sucessfully created a Hello World applet. My first Java bit
I was drawn to Java from a code i found on the net and wanted to get it working:

I was hoping but am not sure, if it would be possible to retrieve the first compressed zip item when the zip is cached on a users computer. My actual goal (hope im heading in the right direction?) is to read from a cached zip file on a users computer from a webpage so the zip contents will speed up page loading cause it is already cached. I don't know if this IS possible?
My question is that I created a .java file with the above code and had errors in the .class creation. If I understand the above correctly it seems that code is driven by the function try, i received my first error at this point and changed try to what was in the Hello World example:
public class HelloWorld extends Applet {
It seemed to over come that error :roll: although i not totally sure.
but the following errors appeared:

Can someone help out this newbie in any way....
[ August 19, 2003: Message edited by: Jason Havelock ]
Saloon Keeper
Posts: 24325
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm not sure if I got all that correct, but I can tell you some things that you'll probably need to know.
1. Caching is done by the browser, so unless you're using an open-source system like Mozilla, you're stuck with whatever caching system the vendor wanted to give you.
2. Many browsers support compressed data transmision transparently and automatically, so you don't have to do anything to get compression when you use them.
3. Anything you put in a JAR file is compressed - a JAR is just a ZIP file with a manifest. Applets are best distribured in JARs, and you can include other items in there as well and retrieve them as applet resources.
4. Last, but not least, thanks to the Java sandbox, it's a real pain to be able to read or write files from the user's computer. You have to create a signed applet and do various other awkward and unpleasant things. A fully portable system would even have to double work, since Microsoft and Netscape don't use compatible signing systems.
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic