I'm confused. I want find JAVA_HOME value in server and type this code in bash script.
ssh username@server "echo ${JAVA_HOME}"
and try
ssh username@server "echo $JAVA_HOME"
or
ssh username@server 'echo $JAVA_HOME'
and all of they not worked;
I replace "JAVA_HOME" with "PATH" and it's work; I connect with ssh to server and try "echo $JAVA_HOME " and it's work. I think the problem is "_" and I don't know how fix it. please help me