A
A
AwvuweWd2019-05-28 20:56:43
Java
AwvuweWd, 2019-05-28 20:56:43

How to substitute values ​​when compiling in Eclipse java?

How to substitute values ​​when building a java project in Eclipse?
I saw something similar in project builds, for example, the version indicated the git title of the project.
You need to substitute the time (epoche time) in the value:
public class Header {
private static String version;
...
}
What I have:
Eclipse:
Version: 2019-03 (4.11.0)
Build id: 20190314-1200
OS: Linux, v.5.1.4-arch1-1-ARCH, x86_64 / gtk 3.24.8, WebKit 2.24 .2
Java version: 11.0.3 or 1.7 (optional)

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question