Java --version does not work using macos xcode

Using macos xcode: 11.0.0 beta i still can’t do a simple - run: java --version which leads me to believe why I am having other issues in my project that is using appium and webdriver.io on a react-native project.

I’ve tried tons of different ways to set the java_home and the path such as

     - run:
            name: js > java
            command: |
                echo 'export JAVA_HOME=$(/usr/libexec/java_home)' >> $BASH_ENV
                echo 'export PATH=${JAVA_HOME}/bin:$PATH' >> $BASH_ENV
                source $BASH_ENV

and still can’t do a -run: java --version