Skip to main content
gamedev.net
🔒 Locked

[java] Security Exception with signed applet

Started by Sparhawk42 0 replies 500+ views
Original Post
Sparhawk42
Sparhawk42
Hello, i want to access some files from my applet in a browser. I have signed my applet:


         137 Sun Dec 11 13:01:28 GMT+01:00 2005 META-INF/MANIFEST.MF
         258 Sun Dec 11 13:01:30 GMT+01:00 2005 META-INF/BORG.SF
        1044 Sun Dec 11 13:01:30 GMT+01:00 2005 META-INF/BORG.DSA
           0 Sun Dec 11 12:53:38 GMT+01:00 2005 META-INF/
sm      3722 Sun Dec 04 11:05:34 GMT+01:00 2005 browser.class

  s = signature was verified
  m = entry is listed in manifest
  k = at least one certificate was found in keystore
  i = at least one certificate was found in identity scope

jar verified.

Warning: This jar contains entries whose signer certificate will expire within s
ix months. Re-run with the -verbose and -certs options for more details.

But every time I call it:

<APPLET code="Browser.class" 
	archive="Browser.jar">
</APPLET>

I still get an Exception:

java.security.AccessControlException: access denied (java.io.FilePermission H:\Projects\meine_HP\borgsoft\index.html read)
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkRead(Unknown Source)
	at java.io.File.isDirectory(Unknown Source)
	at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
	at sun.net.www.protocol.file.FileURLConnection.initializeHeaders(Unknown Source)
	at sun.net.www.protocol.file.FileURLConnection.getHeaderField(Unknown Source)
	at sun.net.www.URLConnection.getContentType(Unknown Source)
	at javax.swing.JEditorPane.getStream(Unknown Source)
	at javax.swing.JEditorPane.setPage(Unknown Source)
	at javax.swing.JEditorPane.setPage(Unknown Source)
	at javax.swing.JEditorPane.<init>(Unknown Source)
	at Browser.<init>(Browser.java:43)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
	at java.lang.reflect.Constructor.newInstance(Unknown Source)
	at java.lang.Class.newInstance0(Unknown Source)
	at java.lang.Class.newInstance(Unknown Source)
	at sun.applet.AppletPanel.createApplet(Unknown Source)
	at sun.plugin.AppletViewer.createApplet(Unknown Source)
	at sun.applet.AppletPanel.runLoader(Unknown Source)
	at sun.applet.AppletPanel.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)


So what have I to do, to access files from my browser via an applet? Thanks for your help!
GKW
GKW
This link should help you:

Link
"... we should have such an empire for liberty as she has never surveyed since the creation ..."Thomas Jefferson

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.