P
PawnsMaster
Hi everyone,
I have a problem with serialization and applets : I have the following part
of code :
ObjectInputStream in = new ObjectInputStream(new
URL(Utilities.getCodeBase(), demoFile + ".sav").openStream());
componentsCount = in.read(); // no problem
System.out.println(componentsCount);
for(int i = 0; i < componentsCount; i++) {
Piece p = (Piece)in.readObject(); // !! problem
add(p);
}
in.close();
Which throws me this exception :
java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessClassInPackage.sun.swing)
By signing the class I made the unserialization work. But I still have a
problem : when I'm accessing my applet from my computer, no problem, but
when I try to access it from another computer of the network, IE crashes !!!
Please help me I don't know what else to do .
I have a problem with serialization and applets : I have the following part
of code :
ObjectInputStream in = new ObjectInputStream(new
URL(Utilities.getCodeBase(), demoFile + ".sav").openStream());
componentsCount = in.read(); // no problem
System.out.println(componentsCount);
for(int i = 0; i < componentsCount; i++) {
Piece p = (Piece)in.readObject(); // !! problem
add(p);
}
in.close();
Which throws me this exception :
java.security.AccessControlException: access denied
(java.lang.RuntimePermission accessClassInPackage.sun.swing)
By signing the class I made the unserialization work. But I still have a
problem : when I'm accessing my applet from my computer, no problem, but
when I try to access it from another computer of the network, IE crashes !!!
Please help me I don't know what else to do .