aspose file tools
The moose likes Applets and the fly likes applet cant be instantiated Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Applets
Reply Bookmark "applet cant be instantiated" Watch "applet cant be instantiated" New topic
Author

applet cant be instantiated

Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 3901
Applet runs in AppletViewer but not in IE.
I am getting this error:
com.ms.security.SecurityExceptionEx[Quiz.<init>]: java.io.IOException: bad path: C:\html\Quiz applet\java\util\HashMap.class
I have many other applets, each in their own folders under html, and they all work fine?
the code is here: http://www.javaranch.com/ubb/Forum33/HTML/001549.html

[This message has been edited by Randall Twede (edited February 05, 2001).]


I never took notes in college. That's how I got a 4.0 the first 2 years, and a 3.5 the second two years.
Carl Trusiak
Sheriff

Joined: Jun 13, 2000
Posts: 3340
Hello Randall,
The security manager of the browser's JVM will not permit unsigned Applets to read or write files on the clients machine. Even if you are running this locally, the security managers interperts the request for "c:\\html\\..." as a request that violates security. Take a look at the Applet HelloServerFile in the CodeBarn for an example of how an Applet can read a text file off the server.

------------------
Hope This Helps
Carl Trusiak


I Hope This Helps
Carl Trusiak, SCJP2, SCWCD
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 3901
Thats not it Carl. The code I posted doesnt do any IO. It seems to be a problem with using a HashMap.
Daniel Olson
Ranch Hand

Joined: Jan 05, 2001
Posts: 81
Isn't HashMap new with Java 1.2? I think IE (and Netscape) only support 1.1.
Randall Twede
Ranch Hand

Joined: Oct 21, 2000
Posts: 3901
I was afraid that might be the problem. I had the whole thing almost done too with using one HashMap. I guess I will have to use Vectors or something.
[This message has been edited by Randall Twede (edited February 06, 2001).]
Daniel Olson
Ranch Hand

Joined: Jan 05, 2001
Posts: 81
Another option is to use Hashtable. It has been around since JDK 1.0.
 
 
subject: applet cant be instantiated
 
Threads others viewed
Where did they go???
need help with design of quiz applet
recursion
This keyword in constructor
Protected Constructors
developer file tools