Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java source / class version stamp

Status
Not open for further replies.

yytan

Programmer
May 8, 2002
113
MY
hi there;

i need to incorporate the version for my java source and compile class. let say for this release, it start from version 1.0 and if there is changes / updates i'll increase the version to 1.1

i need to know how to do a versioning for my java source and the compile class file. is that possible? (i don't mean for the VSS / CVS db which store the physical files and at the same time we can keep versioning there) I hope u get what i want.

appreciate for any guidance / existing url with tips.

rgd/ yoke yew
 
You need the version-info at runtime for each class, like this:

String version = SomeClass.getVersion ();

Why? Which problem can be solved that way?

You define an interface - let's say 'Versioning', and implement it.
Code:
class Foo implements Versioning 
{
            public String getVersion () { return "1.0";}
}

seeking a job as java-programmer in Berlin:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top