If a class has a field (of any accessibility) named serialVersionUID of 
type long, that is what serialver uses. Otherwise it computes a value 
using some sort of hash function on the names of all method signatures 
in the .class file. I'm not sure whether the methods are sorted first, 
or what the hash function is.  The fact that different compilers create 
different synthetic method signatures, such as access$0() if an inner 
class needs access to a private member of an enclosing class, make it 
impossible for two distinct compilers to reliably generate the same 
serial #, because their .class files differ. However, once you have a 
.class file, its serial # is unique, and the computation will give the 
same result no matter what platform you execute on.

Giannis Georgalis wrote:
> 
> Thank you Eric, I however had to run the serialver tool on a
> i386/solaris8 system (I didn't want to install sun's SDK on my
> computer, just for the serialver tool). Does the output match
> every system ? Is there a posibility that there are different
> serialVersionUIDs for different systems?
> 

-- 
This signature intentionally left boring.

Eric Blake             [EMAIL PROTECTED]
   BYU student, free software programmer




_______________________________________________
Classpath mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/classpath

Reply via email to