Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

applet cant be instantiated

 
Randall Twede
Ranch Hand
Posts: 4489
3
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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).]
 
Carl Trusiak
Sheriff
Posts: 3341
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Randall Twede
Ranch Hand
Posts: 4489
3
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Isn't HashMap new with Java 1.2? I think IE (and Netscape) only support 1.1.
 
Randall Twede
Ranch Hand
Posts: 4489
3
Java Python Scala
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 81
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another option is to use Hashtable. It has been around since JDK 1.0.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic