The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2000



This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.


Same problem, but security solution

Posted by Rogier on October 22, 2001 at 9:45 AM

Create policy file (YourfilePol)by copying this into a ascii text file:
grant {
permission java.lang.RuntimePermission
permission java.util.PropertyPermission
"file.encoding", "read";

Then put this in the htm-file:
appletviewer Yourfile.htm
To get rid of the security error.
Whatever I do, I can't get rid of the java.lang.InstantiationException error.

> but above that i get this error:

>[GeoCanvas.]: bad path: C:\WIN\Desktop\geoapp\java\awt\geom\Line2D$Double.class
> at com/ms/security/permissions/FileIOPermission.check
> at com/ms/security/PolicyEngine.deepCheck
> at com/ms/security/PolicyEngine.checkPermission
> at com/ms/security/StandardSecurityManager.chk
> at com/ms/security/StandardSecurityManager.checkRead
> at java/io/File.isDirectory
> at sun/net/www/protocol/file/FileURLConnection.connect
> at sun/net/www/protocol/file/FileURLConnection.getInputStream
> at com/ms/vm/loader/ResourceLoader.getURLData
> at com/ms/vm/loader/ResourceLoader.getCodebaseRelativeData
> at com/ms/vm/loader/ResourceLoader.getClassData
> at com/ms/vm/loader/URLClassLoader.findClass
> at com/ms/vm/loader/URLClassLoader.loadClass
> at java/lang/ClassLoader.loadClassInternal
> at GeoCanvas.
> at GeoApp.
> at GeoApp.
> at com/ms/applet/BrowserAppletFrame.newInstance
> at com/ms/applet/AppletPanel.processSentEvent
> at com/ms/applet/AppletPanel.processSentEvent
> at com/ms/applet/
> at java/lang/

> my geometry app uses Line2D.Double (part of the awt) but for some reason, the browser is looking for a class file for it when i run the applet off my desktop. i don't understand why it would look for that but not have a problem when i use Point2D.Double, or some other awt class...


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us