File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Applets and the fly likes Java newbie troubles Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "Java newbie troubles" Watch "Java newbie troubles" New topic

Java newbie troubles

Jason Havelock

Joined: Aug 19, 2003
Posts: 1
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
Saloon Keeper

Joined: Jun 25, 2001
Posts: 17417

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.

An IDE is no substitute for an Intelligent Developer.
I agree. Here's the link:
subject: Java newbie troubles
It's not a secret anymore!