Is it possible to get a file's creation date in Java?
It is not possible to obtain this information on *nix machines since this information is not stored about the files, only file modification date is stored. Therefore java has no methods for obtaining this information, probably due to it's "write once, run everywhere" policy.
On Windows machines this information is stored, but as said earlier there are no java methods for obtaining it.
-To write a jni app that can retrieve the creation date and pass the value back to Java. (Windows machines only).
-Use Runtime/ProcessBuilder class to execute a operating system process (namely 'dir' on Windows), retrieve the output and parse it to get the values. (Windows machines only).
-To store the date somewhere, such as the in the file itself or in a database (requires a custom application to insert the value and files cannpt be created outside of this process).