title: Installed OpenJDK 15 but $JAVA_HOME still points to oracle JDK 11
body: <p>I have several versions of JDK installed, most of them OpenJDK, but I did install oracle-JDK-11. I am using Xubuntu 20.04 and I don't remember how I installed JDK-11. I have removed and oracle JDK-11 files and folders I can find. I have used update-alternatives to switch to OpenJDK-15. I have run</p>
  <pre><code>export $JAVA_HOME #all of these are complete on my end
  PATH =
  export JAVA_HOME
  export PATH
  </code></pre>
  <p>and ran them pointing to OpenJDK-15.</p>
  <p>Still though <code>echo $JAVA_HOME</code> returns <code>/usr/lib/jvm/java-11-oracle</code>
  I have looked through all of the profile files that I know to look for and everything seems to be pointing to OpendJDK-15 but the variable still points to oracle-11.</p>
  <p>My system is still aware of java-11-oracle somehow and I just want it completely removed. I am about to start a Java course so that I can finally learn it, but I want to make sure my system is setup correctly before I start.</p>
  <p>Edit- For context, I will print a few of my files in /etc/profile.d/
  <strong>jdk.csh</strong></p>
  <pre><code>  1 setenv J2SDKDIR /usr/lib/jvm/java-15-oracle
    2 setenv J2REDIR /usr/lib/jvm/java-15-oracle
    3 setenv PATH ${PATH}:/usr/lib/jvm/java-15-oracle/bin:/usr/lib/jvm/java-15-ora    cle/db/bin
    4 setenv JAVA_HOME /usr/lib/jvm/java-15-oracle
    5 setenv DERBY_HOME /usr/lib/jvm/java-15-oracle/db
  </code></pre>
  <p><strong>jdk.sh</strong></p>
  <pre><code>  1 export J2SDKDIR=/usr/lib/jvm/java-15-oracle
    2 export J2REDIR=/usr/lib/jvm/java-15-oracle
    3 export PATH=$PATH:/usr/lib/jvm/java-15-oracle/bin:/usr/lib/jvm/java-15-oracl    e/db/bin
    4 export JAVA_HOME=/usr/lib/jvm/java-15-oracle
    5 export DERBY_HOME=/usr/lib/jvm/java-15-oracle/db
  </code></pre>
  <p><strong>jdk_home.sh</strong></p>
  <pre><code>  1 export JAVA_HOME=$(readlink -f /usr/bin/javac | sed &quot;s:/bin/javac::&quot;)
  </code></pre>