Adding version info for a package?

David Herron David.Herron at Sun.COM
Fri Sep 12 11:01:08 PDT 2008


Matthias Klose wrote:
> How to add version information for a package build?
>
> $ java -version
> java version "1.6.0_0"
> OpenJDK  Runtime Environment (build 1.6.0_0-b11)
> OpenJDK Server VM (build 1.6.0_0-b11, mixed mode)
>
> does changing this to
>
> $ java -version
> java version "1.6.0_0"
> OpenJDK  Runtime Environment (build 1.6.0_0-b11, Ubuntu 6b11-1ubuntu1)
> OpenJDK Server VM (build 1.6.0_0-b11, mixed mode)
>
> break something? Or should an extra line be added (same thing for the crash report)?
>
>   Matthias
>   

The exact syntax of the -version output isn't well specified.  But there 
is a guideline here:- http://java.sun.com/j2se/versioning_naming.html

That suggests you might use:  1.6.0_0-b11-1ubuntu1 ??

Are you also modifying the value of the system property java.version ??

Another thought is the -version:string option which the java command 
uses to select from multiple versions.   Okay, sure, Ubuntu has its own 
alternatives mechanism, but you could also modify the handling of 
-version:string and how would your modified version string affect this?

Related docs

http://java.sun.com/javase/6/docs/technotes/guides/versioning/spec/versioningTOC.html

http://java.sun.com/javase/6/docs/api/java/lang/System.html#getProperties()

http://java.sun.com/javase/6/docs/technotes/tools/solaris/java.html



More information about the jdk6-dev mailing list