Hello tous,
Voici ce qu'il m'arrive:

java.io.NotSerializableException
at KeyEmulator.mainTest.main(mainTest.java:33)


Il se plante au "out.writeObject(newKeyItem);"

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
...
private ArrayList newKeyItem= new ArrayList(); 
 ...
 
 
public void writeKeyItems(){
    try {
        ObjectOutputStream out = new ObjectOutputStream
                           (new FileOutputStream("keyItems.dat"));
        out.writeObject(newKeyItem);
     }
     catch (Exception e) {e.printStackTrace();System.exit(1);}
 }
Qqun peux m'aider ?