Find the process id for which the environment variables need to be found
ps faux | grep 'your_process'
Result
saurabh 11654 0.6 3.0 3773360 243208 pts/1 Sl 10:33 0:47 /usr/lib/jvm/java-8-openjdk-amd64/bin/java
Get the PID of the process which is 11654
in the case above
cat /proc/11654/environ