[SOLVED] "bash: java: command not found" with OpenJDK
by arfon from LinuxQuestions.org on (#5KWB2)
It's been awhile but, I went through this garbage again:
Code:"bash: java: command not found"...with OpenJDK installed.
I searched this forum and didn't find the answer. Eventually I found the answer and remembered that I have gone through this in the past so, I'm posting this for future searches...
AFTER you install AlienBOB's OpenJDK's package, you have to log out and log back in (I reboot just to make sure).
This is because a script is added to /etc/profile.d that adds the path to the java binary into the $PATH. (If you care, /etc/profile is what executes the new script in /etc/profile.d)
Code:"bash: java: command not found"...with OpenJDK installed.
I searched this forum and didn't find the answer. Eventually I found the answer and remembered that I have gone through this in the past so, I'm posting this for future searches...
AFTER you install AlienBOB's OpenJDK's package, you have to log out and log back in (I reboot just to make sure).
This is because a script is added to /etc/profile.d that adds the path to the java binary into the $PATH. (If you care, /etc/profile is what executes the new script in /etc/profile.d)