J
javaPanther
Gast
Hallo Jungs und Mädels,
ich habe mein kleines Applet mittlerweile soweit zum laufen gebracht, dass jetzt nur noch ein kleines/ großes Problem dahintersteckt:
Falls mir Jemand bitte sagen kann woran das Problem liegt dann sagt es mir bitte.
Gruß
javaPanther
ich habe mein kleines Applet mittlerweile soweit zum laufen gebracht, dass jetzt nur noch ein kleines/ großes Problem dahintersteckt:
Hier die Klasse aus der geladen wird:java.security.AccessControlException: access denied (java.io.FilePermission input.ser 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.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at MapSpeicher.loadSpeicher(Control.java:167)
at Control.init(Control.java:38)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Ausnahme: java.security.AccessControlException: access denied (java.io.FilePermission input.ser read)
Java:
class MapSpeicher
implements Serializable
{
private static final long serialVersionUID = 1L;
//Attribute
public HashSet<String> mapList = new HashSet<String>();
public MapSpeicher loadSpeicher(MapSpeicher maps){
try {
FileInputStream fs = new FileInputStream("http://bsx.lima-city.de/BurgerSturmeXtrem/input.ser");
ObjectInputStream is = new ObjectInputStream(fs);
maps = (MapSpeicher)is.readObject();
} catch (ClassNotFoundException e) {
System.err.println(e);
} catch (IOException e) {
System.err.println(e);
}
return maps;
}
public void saveSpeicher(MapSpeicher maps){
try {
FileOutputStream fs = new FileOutputStream("input.ser");
ObjectOutputStream os = new ObjectOutputStream(fs);
os.writeObject(maps);
os.close();
} catch (IOException e) {
System.err.println(e);
}
}
}
Falls mir Jemand bitte sagen kann woran das Problem liegt dann sagt es mir bitte.
Gruß
javaPanther
Zuletzt bearbeitet von einem Moderator: