>CF docs talk about "Configure app initialization", see https://docs.cloudfoundry.org/devguide/deploy-apps/deploy-app.html#profile however the method described there is not support by the java buildpack.
That doc note is incorrect. You can use a `.profile` script with *any* buildpack. It's functionality provided by the foundation not the buildpack.
The trouble with the Java buildpack is that it's not easy to make it work because of where the `.profile` script needs to live and the way that for Java apps you push a WAR or JAR file. The `.profile` script needs to be in the root of what you push, which means it needs to be in the root of your WAR or JAR, which can be a pain depending on how you build the WAR or JAR file.
See Additional Info in this KB for details on how to make it work with a JAR or WAR.
Aside from that, you could initialize the value in your app. If you're using Spring, that might be using SpEL or by combining a couple properties in your `application.properties` or `application.yml` file.
Hope that helps!