🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #8302

Re: Version control of java classes

#8302
From: Lukas Marek
Date: Thu, 29 Mar 2001 12:34
49 lines
2168 bytes
Hello,

why don't you use some kind of Version Control? See http://www.cvshome.org,
for example. Then you can use something like this:

private final String version = "$Revision$";

public String getVersion() {
    return version;
};

And the CVS replaces the $Revision$ string with current version of file:
$Revision 1.5 $....

Or we use this just in header of file:
/*
*    Foo.java
*    Version: $Revision$
*     FileId: $Id$
*/

Hope this works,
Lukas
"Peter Kirk" <peter_kirk@alpha-gruppen.dk> wrote in message
news:3ac30315_2@dnews...
> Hi there,
>
> does anyone have any ideas on how I can "version" the java classes I
write?
> If I am at a customer site it is helpful to know exactly which versions of
> software they are using.
>
> I have thought about adding some sort of version string to each class
file,
> eg.
> private final String "PKVersion: R01.00"
> or something like that, and then searching the file to find "PKVersion:".
>
> Or maybe, each class could implement a version interface, and provide a
> method like getVersion(), which returned a version number - so I'd need
some
> sort of utility to load the class and obtain the version.
>
> Any help and ideas is appreciated.
>
> Thanks,
> Peter.
>
>
Technical Details
Message-ID: <3ac32bc3_2@dnews>
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!195.47.110.242
References: <3ac30315_2@dnews>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,9ec6888ac4d738bb
X-Google-Attributes: gidf74b3,public
X-Google-ArrivalTime: 2001-03-29 04:48:02 PST
Reply-To: "Lukas Marek" <lukas.marek@cleverlance.com>
From: "Lukas Marek" <lukas.marek@cleverlance.com>
Newsgroups: borland.public.jbuilder.java.language
References: <3ac30315_2@dnews>
Subject: Re: Version control of java classes
Date: Thu, 29 Mar 2001 14:34:12 +0200
Lines: 51
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400
NNTP-Posting-Host: 195.47.110.242
Message-ID: <3ac32bc3_2@dnews>
X-Trace: 29 Mar 2001 04:34:11 -0800, 195.47.110.242
Path: arc1-ca.pugleaf.net!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news-out-sjo.usenetserver.com!newsfeed.wirehub.nl!PeerFeed.KWeb.on.ca!dnews!195.47.110.242