I wonder which of the following is a preferred approach?
We can set things up as APP_HOME=/path/to/file
(export
in .profile
or som
Can't comment yet at the moment, so I will add a couple of points as an answer.
I agree with the javadoc's saying "It is best to use system properties where possible.", also in my own words previous to seeing this page here that the Java system variables are encapsulated inside the JVM. They are not visible to other processes on the host, and thus less coupled with the host system.
In addition, there are multiple interfaces to set the global environment variables, and so it could be a bit tricky to track all the values being used over time.