Bonjour,
Je fais une grosse applet qui doit notamment lire un fichier sur l'ordinateur de l'utilisateur.
En local, évidemment tout marche nickel. J'ai signé par moi-même avec jarsigner l'applet, j'ai mis tout ca sur mon serveur. Mon browser me demande d'accepter d'executer l'applet :


L'applet se lance donc, et je peux faire plusieurs actions.
POurtant quand j'arrive au JPanel créant un JFileChooser(), tout part en:§!#@.
La ligne comporte juste this.fileChooser=new JFileChooser();

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 
Exception in thread "AWT-EventQueue-2" java.lang.ExceptionInInitializerError
    at sun.awt.shell.Win32ShellFolder2$ComTask.execute(Unknown Source)
    at sun.awt.shell.Win32ShellFolder2.getFileSystemPath(Unknown Source)
(...)
at javax.swing.JComponent.setUI(Unknown Source)
    at javax.swing.JFileChooser.updateUI(Unknown Source)
    at javax.swing.JFileChooser.setup(Unknown Source)
    at javax.swing.JFileChooser.<init>(Unknown Source)
    at javax.swing.JFileChooser.<init>(Unknown Source)
    at eadmin.gui.etapes.EtapeEleve.<init>(EtapeEleve.java:49)
    at eadmin.gui.etapes.AccueilEtapes.boutonEtapeElevesActionPerformed(AccueilEtapes.java:478)
(...)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
    at java.awt.EventDispatchThread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission shutdownHooks)
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at java.lang.Runtime.addShutdownHook(Unknown Source)
    at sun.awt.shell.Win32ShellFolder2$ComTaskExecutor.<init>(Unknown Source)
    at sun.awt.shell.Win32ShellFolder2$ComTaskExecutor.<clinit>(Unknown Source)
    ... 46 more
J'ai bien vu ici et des raisons sur les policy files utilisable avec AppletViewer, mais je vois mal mes petits élèves et collègues prof créer leurs propres policy-files.

Bref pourquoi mon applet signée n'a t-elle pas accès aux ressources locales ?