Reputation: 2523
Is there an easy way to list environment variables of some running java process?
It's easy to check JVM arguments and system properties using jvisualvm, but it does not show environment.
Upvotes: 2
Views: 3250
Reputation: 33103
This information is provided by the operating system and is not specific to Java processes. As @agbinfo noted, on Windows use procexp, on Linux/Unix use ps. The specific ps command to use is:
ps e -ww -p 1234
where 1234 is the PID of your Java process.
Upvotes: 3
Reputation: 1898
If it's a Spring Boot application then the environment variables are exposed via /env endpoint as systemEnvironment.
Upvotes: 0