serialver?



OK, experienced developer, but new to Java (and eclipse, which is another
hurdle until I get used to it).

I inherited a project that has several classes that implement Serializable
and have a serialVersionUID variable. I created a new class that is a clone
of several of these existing ones and want to generate a serialVersionUID
for it. Looking on-line, I found several descriptions for serialver. I've
had no luck with it. I keep getting "class xxx not found" messages.

The file is a few folders deep, say src/dir1/dir2/dir3/myclass. From what
folder do I execute serialver and what do I use as the class name? The
package it belongs to would be dir1.dir2.dir3

Found an eclipse plug-in, but says the feature is "not available here", or
something like that.

I think an issue may be that these are all in .java files and not .class
files. But all the ones with serialVersionUIDs are .java files.

Also, do I need to generate a new one everytime the class changes?

BTW, the person who originally developed this doesn't remember how they were
generated.

Thanks!


.



Relevant Pages

  • Re: local class incompatible: stream classdesc
    ... I am using eclipse IDE and i have two different projects A and B. I ... Then I have another application, call it C, that uses the jar files of ... stream classdesc serialVersionUID = -3611946473283033478, ... University of Leicester, Leicester, LE1 7RH, UK ...
    (comp.lang.java.programmer)
  • Re: local class incompatible: stream classdesc
    ... I am using eclipse IDE and i have two different projects A and B. I ... Then I have another application, call it C, that uses the jar files of ... stream classdesc serialVersionUID = -3611946473283033478, ... Nigel Wade, System Administrator, Space Plasma Physics Group, ...
    (comp.lang.java.programmer)
  • Re: [Eclipse 3.1] serialVersionUID
    ... Ah und vergessen: Am 21.7 wurde hier ein Thread zu dem Thema gestartet: ... serialVersionUID in Eclipse ... Next by Date: ...
    (de.comp.lang.java)
  • Wie =?ISO-8859-1?Q?f=FChre_ich_ein_Java-Programm_aus=3F?=
    ... aber mit Java hatte ich bisher absolut ... RitzelRechner.java:71: warning: addItemin java. ... definition of serialVersionUID ... RitzelRechner.java:162: warning: serializable class Ritzelgrafik has no ...
    (de.comp.lang.java)
  • Generate serialVersionUID in Eclipse for serializable object
    ... When it's a good time to generate this serialVersionUID (say in ... Eclipse)? ... In the very beginning when creating this object class? ... middle of writing this class is ok? ...
    (comp.lang.java.programmer)