our environment:
Windows NT4.0 SP5, Netscape 7.02, JRE 1.3.1_04, a correctly verified
signed Java Applet (jar), signed with jarsigner 1.4 (Problems has
occured with 1.3 jarsigner).
In IE 5.0 with the Sun Plugin 1.3.1_04 the signed applet can correctly
be used, means has permissions to read and write to disk...
In NES 7.02 with Sun Plugin 1.3.1_04 the signed applet can't read from
disk, I get the following permission exception:
[Entering]getFloppyDrive()
java.security.PrivilegedActionException:
java.lang.reflect.InvocationTargetException:
java.security.AccessControlException: access denied
(java.io.FilePermission A:\ 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
dreba.prj.ffp.applet.security.AppletKeyDatabase.getFloppyDrive(AppletKeyDatabase.java:580)
Are there some restrictions using the Plugin with Netscape ?
Thanx
Michael
> In NS 7.02 with Sun Plugin 1.3.1_04 the signed applet can't read from
> disk, I get the following permission exception:
Have you tried installing a new SecurityManager, e.g.:
System.setSecurityManager(new SecurityManager() {
// override some methods
public void checkRead() {}
public void checkAccess() {}
});
I wrote a classloader a few days ago, but it got stock due to runtime
permission failure on getClassloader, installing a new SecurityManager
in the signed applet did the trick.
--
Never ask the barber if you need a haircut.
--> No I didn't, I will try it. Is it allowed to replace the
SecurityManager inside the Applet ?
I replaced in my applet the SecurityManager but this is forbidden, I get a
the following exception in my signed test applet:
replaceSecurityManager()
ex: access denied (java.lang.RuntimePermission createSecurityManager)
java.security.AccessControlException: access denied
(java.lang.RuntimePermission createSecurityManager)
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.<init>(Unknown Source)
at mytest.VMHelperApplet$1.<init>(VMHelperApplet.java:67)
at mytest.VMHelperApplet.replaceSecurityManager(VMHelperApplet.java:67)
at java.lang.reflect.Method.invoke(Native Method)
at sun.plugin.liveconnect.PrivilegedCallMethodAction.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.liveconnect.SecureInvocation.CallMethod(Unknown Source)