O'Reilly logo

Java Enterprise in a Nutshell, Third Edition by William Crawford, Jim Farley

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

serialver: The RMI Serial Version Utility — JDK 1.1 and later

Synopsis

    serialver [ options ] fully-qualified-classnames

Description

The serialver utility generates a serial version ID you can use to mark a given class definition to track its versions as it evolves. The utility returns a static int member declaration you can paste into your Java class definition. For example, this command:

    % serialver AccountImpl

generates output something like:

    AccountImpl: static final long serialVersionUID = 37849129093280989384L;

If versioning of your remote object classes becomes a problem for clients, this utility can tag a class with a version ID that can be checked to see if the proper version is being exported by your server for a given client or if its local version is out of date. Serial version IDs are used by Java object serialization to uniquely identify class definitions and should be placed on any Serializable classes that you implement.

Options

-classpath pathlist

Provides the classpath serialver uses to find any required classes or resources. This option overrides the environment CLASSPATH and the default classpath. The directories in the list are separated by colons in Unix environments (including Mac OS X) and by semicolons in Windows environments.

-J[ javaoption ]

Anything immediately following the -J is passed as an option to the underlying Java interpreter. There should be no spaces between the -J and the option to be passed to the interpreter.

-show

Uses the graphical version of ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required