I have a simple self-signed applet (made with keytool and jarsigner):
public class NetAppletLauncher extends JApplet { private static final long serialVersionUID = 1L; public void init() { exec("notepad c:/hello.txt"); } public void exec(String command) { try {
Basically what he does is that he executes 'notepad c: /hello.txt'.
Then paste the applet into html:
<applet id='applet' name='applet' archive='NetAppletLauncher1.jar' code='src.NetAppletLauncher' width='100' height='100' MAYSCRIPT ></applet>
When I am on the page, the JRE starts up and asks if I want to run this applet and if I hope so. I click OK. Then the notebook starts - as you would expect. There is no problem.
But then I add this to the HTML page:
<p class="link" onclick="document.applet.exec('calc');">remote desktop2</p>
Now, when I click on this text, calc should start - right? But it gives me:
java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute) at java.security.AccessControlContext.checkPermission(Unknown Source)
- What's up with that? Why is he now giving me a security exception, but can he start notepad earlier?
source share