Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compilation date




On Nov 17, 2007, at 6:33 PM, Patrick Lacour wrote:

To optimize plug-ins management in a app I wrote,
I have a class-member "versionDate". But I forgot
always to update this variable, when I modify a plug-in.

Were it possible to find a member "compilation date"
on a Class, or to find this by parsing directly the
compiled-code ? File systems "modification date" is
not reliable, since it could be altered by packaging or
multiple copying...
I searched but found nothing.
This must be Java 1.1 compatible...

No date in the class file format per... http://en.wikipedia.org/wiki/Class_(file_format) (CAFEBABE origin anecdote though)

Assuming it's Mac you could assume javac in the classpath and create a class with the current date hard coded on the fly, I believe javac has been system classpath going back to pre-OS X 1.1 MRJ days.

Or you could serialize a object with the date and try to change that when you compile your plugin somehow.


Mike Hall hallmike at att dot net http://www.geocities.com/mik3hall http://sourceforge.net/projects/macnative



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Java-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/java-dev/email@hidden

This email sent to email@hidden
References: 
 >Compilation date (From: "Patrick Lacour" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.