Serial version UID
843810Aug 3 2005 — edited Feb 15 2007Hello everybody!
Yesterday I have installed JDK 5.0. Before I was using JDK 1.4.2.
Now with the new distribution, I cant compile one of my program which
goes fine with JDK 1.4.2. Whereas in JDK 5.0, when try I compile it using
javac command, It gives me the following message:
Note: mymediaplayer.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Then I try with the -Xlint option and it gives me the following message:
mymediaplayer.java:349: warning: [unchecked] unchecked call to add(E) as a membe
r of the raw type java.util.Vector
vector.add(cbMenuItem);
^
mymediaplayer.java:47: warning: [serial] serializable class MyMediaPlayer has no
definition of serialVersionUID
public class MyMediaPlayer extends JPanel implements ActionListener,ControllerLi
stener,KeyListener,ItemListener
^
2 warnings
The cbMenuItem is the object of JCheckBoxMenuItem class. Shouldn't I use it with Vector?
Again, why is it asking for a SerialVersionUID? What does it mean?
Can anybody tell me what's going wrong and how to solve?
Thanks...