I've subclassed SecurityException, created a
FilePermission(String progname, String access) object as a class
variable member.
In this class, I override the checkExec(Permission p) method so
that it will not throw a SecurityException. In this method, I
call checkPermission(Permission p), its argument the
FilePermission object (cast to Permission).
Also, I've created a java policy file.
The end result I'm looking for is to be able to run an executable
from within the applet via
Runtime.getRuntime().exec("someprog.exe").
When I invoke appletviewer with the URL, the following errors are
produced:
java.security.AccessControlException: access denied
(java.lang.RuntimePermission
createSecurityManager )
at
java.security.AccessControlContext.checkPermission(AccessControlC
onte
xt.java:195)
at
java.security.AccessController.checkPermission(AccessController.j
ava:
403)
at
java.lang.SecurityManager.checkPermission(SecurityManager.java:54
9)
at
java.lang.SecurityManager.<init>(SecurityManager.java:307)
at MySecurityManager.<init>(MySecurityManager.java:6)
at MyApplet.init(MyApplet.java:12)
at sun.applet.AppletPanel.run(AppletPanel.java:357)
at java.lang.Thread.run(Thread.java:479)
Has anyone ever changed permissions for something that an applet
by default has restrictions?
This is jdk1.2.
Any help would be appreciated.
-----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------
http://www.newsfeeds.com The Largest Usenet Servers in the World!
------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==-----
craig