andrbrue
andrbrue

Reputation: 731

Set variables at and depending on compile-time

Is there any way to set a constant to a value which depends on the time of compilation? I want my application to have a

public static final String RELEASE_DATE = "<???>";

similar to

#define RELEASE_DATE __DATE__

in C, which contains the date when the version was compiled. Of course I could change it manually everytime but there has to be a better way. Do Java and/or Eclipse give any possibilities to achieve that although Java does not have a preprocessor?

Upvotes: 1

Views: 165

Answers (0)

Related Questions