Changed environment variable values are not getting shared between steps

Currently, my build job https://circleci.com/gh/neomatrix369/awesome-graal/85#config/containers/0 is breaking due to the fact that the environment JAVA_HOME which I have assigned in the env variable section cannot be changed via any of the steps thereafter. Which you can see from the error message:

  File "/home/graal/project/graal/compiler/mx.compiler/suite.py", line 312 in definition of org.graalvm.compiler.api.runtime:
JDK library JVMCI_API required by org.graalvm.compiler.api.runtime not provided by Java 1.8.0-internal (1.8) from /opt/java/openjdk/jdk8u144-b01

This is important for us to be able to do it - unless there is another way to overcome the issue.

I have tried something new and that failed too https://circleci.com/gh/neomatrix369/awesome-graal/87#config/containers/0 - was trying to use envrc to save and load env settings

Any update on this one? Would love to hear how others have resolved this?