Identifying when and where a class was built and its rev. number

I have to create applications that go into environments that are regulated by folks like the FDA. This means that when the apps are deployed we want to have a script that demonstrates the correct components are installed in the right place. This requires that we "label" each file with the data and time of the build, the build number, author etc. etc. So at the very least you can use normal file system commands to display this info.
Are there any tools in Java to support this, also does anybody have any suggestions of the best way to do this.
Thanks Steve

I don't know of any tools in Java to do this. However, you may be able to get what you want from your source code control system. I think that CVS, SCCS and RCS all let you put special strings in the files ("%D%" or "$Revision$" or somethind like that) which get expanded at checkin time (which I would think would be more important that compile time). Often people put these in the javadoc comments so that they show up in the documentation. However, then they get lost from the compiled file. If you make them strings, hoever, they'll stick around in the .class file. Something like this:
public static final String VERSION_CONTROL_STUFF = "$Revision$ $Author$";In Unix, you can use "ident" or "strings" or something to extract that info from the class file
$ ident MyClass.class
MyClass.class:
     $Revision: 1.17 $
     $Date: 2001/07/21 04:39:12 $

Similar Messages

Maybe you are looking for