Article 5KWB2 [SOLVED] "bash: java: command not found" with OpenJDK

[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)latest?d=yIl2AUoC8zA latest?i=5k7YWVydzHc:LAwKsHPql64:F7zBnMy latest?i=5k7YWVydzHc:LAwKsHPql64:V_sGLiP latest?d=qj6IDK7rITs latest?i=5k7YWVydzHc:LAwKsHPql64:gIN9vFw5k7YWVydzHc
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments