Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Java newbie troubles

Jason Havelock
Posts: 1
  • Mark post as helpful
  • send pies
  • 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 ]
Tim Holloway
Posts: 18467
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • 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.
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!