I had open JDK installed in my Linux EC2. But then i installed oracle JDK. As i wanted to set oracle JDK path for all users i have set in
/etc/profile
When i do echo $JAVA_HOME.It shows me correct path of oracle JDK. But when i do it shows me path of openJDK.
$env
JAVA_HOME path showing open JDK
Please suggest why JAVA_HOME is still pointing to openJDK and how to make it point to oracle JDK for all users.I have reboot the system but its still showing openJDK path when i do env.