One of the applications requires JAVA_HOME variable. Java is installed. In ~/.profile I have this:


export JAVA_HOME


I've added the last 3 lines. Then I ran source ~/.profile and the same terminal window it showed the /usr/lib/jvm/default which was correct. However, in the new terminal it showed nothing. What did I forget?

  • did you open the new terminal after you edited your .profile? – Wayne_Yux May 28 '16 at 10:30

.profile is run at login but a new terminal window is not a login and instead runs ~/.bashrc.

if you log out of your session and login again your .profile will have the desired effect and your new terminal sessions after the login will inherit these settings from the initial login.

  • should java_home include the bin directory? – Oskar K. May 28 '16 at 11:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.