$ env
...
When I try to print my shell environment on macOS, I find there is not a JAVA_HOME
, but my JVM still works.
So I am very confused, I just want to understand how JVM finds the location of JDK when there is not indicated from shell env
.
Then my JDK location is /Library/Java/JavaVirtualMachines/jdk-9.0.1.jdk
, if I move out this folder, JVM will not work.
I know this is useless and very stupid. But I just want to fully understand how does this work, please help.