In order to get the message to appear every time we open a terminal execute:.
Ad an echo message just to see a greeting message by pasting echo 'Hello, Your Bash Profile Is Running…' (If it is the first time, it should be empty)Ģ. The file you're probably looking for is ~/.bashrc, which is sourced by bash (i.e. This is what happens if you, say, log in, or if you run bash -login. bash_profile are only executed when you start a Login Shell. The first is for Windows (I'm assuming it's windows based on your filepath), the one The contents of. rwxr-xr-x 1 root root 6464 Mar 14 18:28 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/javaĪs it is not being referenced to any other directory, we'll use this.Īppend the following lines JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-amd64Įcho $JAVA_HOME not returning jdk location, Try echo %JAVA_HOME% instead of echo $JAVA_HOME. Lrwxrwxrwx 1 root root 46 /etc/alternatives/java -> /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/javaĭig deeper: $ ls -l /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java Java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz In my case while setting up Maven, I had to set it up to where JDK is installed.įirst find out where JAVA is installed: $ whereis java