• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 229
  • Last Modified:

Can a class print it's own compile date?

Dear Experts:

Can a Java class print it's own compile date?  Is there any way to get any information programatically about that?

At remote sites, it's much easier for me to see the output of classes than to see the classes themselves.  I often want to verify that a customer has the most recent code. It would be helpful if the class could write the date on which it was compiled to it's log file.

(I know the answer is probably "no".  Just thought I'd ask...)

Thanks!
BrianMc1958
0
BrianMc1958
Asked:
BrianMc1958
  • 3
  • 2
  • 2
  • +2
4 Solutions
 
CEHJCommented:
You could annotate it with a date
0
 
WebstormCommented:
Hi BrianMc1958,

You can get the last modified time of the .class file using java.io.File or java.util.jar package if your classes are in a jar archive.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
objectsCommented:
> (I know the answer is probably "no".  Just thought I'd ask...)

short answer is no
0
 
Mayank SAssociate Director - Product EngineeringCommented:
It is more recommended to check the version rather than the date, if you want to make sure that they have the latest.
0
 
BrianMc1958Author Commented:
Thanks, folks...
--BrianMc1958
0
 
CEHJCommented:
:-)
0
 
objectsCommented:
no worries :)
0
 
WebstormCommented:
:-)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 2
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now