I want to make server client aplication and use ObjecOutputStream to send Object to client, but in object which I want to send is ObjectOutputStream object and I need to serializable it somehow but I dont know how... any advice?
I need to send object Player:
public class Player implements Serializable{
ObjectOutputStream out;
public Player(ObjectOutputStream out){
this.out = out;
}
public send(){
this.out.writeObject(this);
}
}
after launch similar code like this an exeption show this:
java.io.NotSerializableException: java.io.ObjectOutputStream