Where Is Java_Home in Ubuntu?

Where Is Java_Home in Ubuntu?
Contents

Where is my JAVA_HOME Ubuntu?

Setting JAVA_HOME environment variable in Ubuntu

  • Open a terminal.
  • Open “profile” file using following command: sudo gedit /etc/profile.
  • Find the java path in /usr/lib/jvm. If it’s JDK 7 the java path would be something similar to /usr/lib/jvm/java-7-oracle.
  • Insert the following lines at the end of the “profile” file.

What is JAVA_HOME in Ubuntu?

On Ubuntu, we can add JAVA_HOME environment variable in /etc/environment file. Note. /etc/environment system-wide environment variable settings, which means all users use it. It is not a script file, but rather consists of assignment expressions, one per line.

Sarah Jenkins
Author

Sarah Jenkins

Sarah Jenkins is a veteran tech journalist with over 12 years of experience covering artificial intelligence, mobile innovations, and digital ethics. Her insights have appeared in leading technology publications worldwide.