I am trying to run java program from a recipe. 

I get an error that JAVA_HOME is not set.
I can verify that JAVA_HOME is set by echo $JAVA_HOME. 

I can then run the program without issue, but from within a recipe it
seems that $JAVA_HOME is unset.

I have verified this with 'bbnote "java is here: ${JAVA_HOME}"' from within a recipe.

Any ideas why or how this is getting unset, and how to fix?
I couldn't find any documentation that talks about this.

Thanks