Problem writing a file!

I am using NetBeans 5

I want to save this class...

package castlesiege;

import java.util.*;

import java.io.*;

publicclass PlayerVectorextends Vectorimplements Serializable{

staticfinallong serialVersionUID = -2767605614048989439;

public PlayerVector(){

super(30);

}

}

using this class... (this is just a test, the real code will be slightly less stupid)

package castlesiege;

import java.io.*;

publicclass Save{

public ObjectOutputStream outputMeans;

public File file =new File("file");

public Save(){

PlayerVector veky =new PlayerVector();

veky.add(new Player());

try{

outputMeans =new ObjectOutputStream(new FileOutputStream(file));

outputMeans.writeObject(veky);

outputMeans.flush();

outputMeans.close();

System.out.println("Complete");

}

catch(IOException ioException){

System.out.print("io");

ioException.printStackTrace();

}

}

publicstaticvoid main(String args[]){

Save x =new Save();

}

}

I just want to store one vector with lots of different players' data using a very simple technique. And it worked perfectly outside of NetBeans and without the package declaration. But now I get an IOException which is born from a NotSerializableException (I think, I read up the tree). What did I do wrong?

[2882 byte] By [Galm_1a] at [2007-11-27 2:24:40]
# 1
I figured it out and now I feel like an idiot. I did not know Player also had to be serializable. It was before, but I removed the implementation when I transfered it to NetBeans. I knew I did not need to come to this horrid forum. :-)
Galm_1a at 2007-7-12 2:31:57 > top of Java-index,Java Essentials,New To Java...
# 2
The horridness of this forum is greatly influenced by the stupidity of the people who ask questions. You may judge for yourself if that includes this post or not.
gimbal2a at 2007-7-12 2:31:57 > top of Java-index,Java Essentials,New To Java...
# 3
The most horrendous part of this forum is arrogant a**holes like you, gimbal2.Message was edited by: ValaChick
ValaChicka at 2007-7-12 2:31:57 > top of Java-index,Java Essentials,New To Java...
# 4
The little smiley was meant to imply sarcasm. Sorry. This forum is a good place for uneducated people like me.
Galm_1a at 2007-7-12 2:31:57 > top of Java-index,Java Essentials,New To Java...