Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Serial version UID

843810Aug 3 2005 — edited Feb 15 2007
Hello 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...
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 15 2007
Added on Aug 3 2005
7 comments
159 views