Podpisany aplet daje AccessControlException: odmowa dostępu podczas wywoływania z javascript

Mam prosty, samodzielnie podpisany aplet (zrobiony z keytool i 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 {

            // launch EXE and grab stdin/stdout and stderr
            Process process = Runtime.getRuntime().exec(command);
            //      OutputStream stdin = process.getOutputStream();
            InputStream stderr = process.getErrorStream();
            InputStream stdout = process.getInputStream();

            // "write" the parms into stdin
//          stdin.write(arguments.getBytes());
//          stdin.flush();
//          stdin.close();

            // clean up if any output in stdout
            String line = "";
            BufferedReader brCleanUp = new BufferedReader(new InputStreamReader(stdout));
            while ((line = brCleanUp.readLine()) != null) {
                //System.out.println ("[Stdout] " + line);
            }
            brCleanUp.close();

            // clean up if any output in stderr
            brCleanUp = new BufferedReader(new InputStreamReader(stderr));
            while ((line = brCleanUp.readLine()) != null) {
                //System.out.println ("[Stderr] " + line);
            }
            brCleanUp.close();

        } catch (Exception exception) {
            exception.printStackTrace();
        }

    }

}

Zasadniczo to, co robi, to wykonanie „notepad c: /hello.txt”.

Następnie osadzam aplet w html:

<applet id='applet' name='applet' archive='NetAppletLauncher1.jar' code='src.NetAppletLauncher' width='100' height='100' MAYSCRIPT ></applet>

Gdy odwiedzam stronę, JRE uruchamia się i pyta mnie, czy chcę uruchomić ten aplet i czy mu ufam. Naciskam ok. Następnie zaczyna się notatnik - tak jak powinien. Nie ma problemu.

Ale potem dodaję to do strony HTML:

<p class="link" onclick="document.applet.exec('calc');">remote desktop2</p>

Teraz, kiedy naciskam ten tekst, calc powinien się zacząć - prawda? Ale to daje mi:

java.security.AccessControlException: access denied (java.io.FilePermission <<ALL FILES>> execute)
    at java.security.AccessControlContext.checkPermission(Unknown Source)
co z tym? Dlaczego teraz daje mi wyjątek bezpieczeństwa, ale może wcześniej uruchomić notatnik?

questionAnswers(4)

yourAnswerToTheQuestion