A Plethora of Versions
  Posted July 23, 2004    PermaLink    Comments (0)  

Versioning versioning, let me count the ways in java...

  • /**@version 1*/ - In the beginning there was JavaDoc. All this version tag was put a pretty version number in the HTML documentation file. Lives in the code and documentation.
  • long serialVerUID = 1L; - Introduced in Java 1.1, used for object serialization. Lives in the code and class files.
  • <extension>-Implementation-Version: 1 - Introduced in Java 1.3, used for standard extensions (which were introduced in 1.2). Applies to the jar as a whole. Lives in the manifest.
  • Implementation-Version: 1 - When used in a package section of a manifest this applies to the whole package. Also introduced in Java 1.3.
  • application/x-java-archive-diff: 1 - WebStart has it's own concept of versioning as well. This version is sent by a HTTP header field, and can apply to any resource referenced by a JNLP file.

Four different ways to specify versions, and each with different scope and semantics. For example, the extension and package versioning have notions of specification version and implementation version. All but JNLP consider the version identifier to be opaque and have no meaning beyond identity. JNLP dedicates an entire appendix in the specification to version ordering and matching. And don't forget the unofficial methods like strange manifest headers and Version classes.

At least there isn't a Version annotation introduced in Java 5.0. Not yet anyway.

Trackback URL
  TrackBack URL for this entry:
Post Comment

Thanks for signing in, . Now you can comment. (sign out)

(If you haven't left a comment here before, you may need to be approved by the site owner before your comment will appear. Until then, it won't appear on the entry. Thanks for waiting.)

Remember me?

Email Address: