title: Unable to locate an executable at "/Library/Java/JavaVirtualMachines/..."
body: <p>I want to install an NPM express generator:</p>
  
  <p><code>sudo apt npm install -g  express-generator</code></p>
  
  <p>It throws the following error:</p>
  
  <p><code>Unable to locate an executable at "/Library/Java/JavaVirtualMachines/openjdk-14.0.1.jdk/Contents/Home/bin/apt" (-1)</code></p>
  
  <p>I installed Java in this path (it's not in the System/Library/ - maybe thats the issue?):</p>
  
  <p>'MacintoshSSD/Library/Java/JavaVirtualMachines/openjdk-14.0.1.jdk/Contents/Home'</p>
  
  <p>My .bash_profile looks like that:</p>
  
  <p><code>export JAVA_HOME=$(/usr/libexec/java_home)</code></p>
  
  <p>If I check JAVA_HOME it looks fine:</p>
  
  <p><code>echo $JAVA_HOME
  /Library/Java/JavaVirtualMachines/openjdk-14.0.1.jdk/Contents/Home</code></p>
  
  <p>.. and Java version:</p>
  
  <p><code>java --version
  openjdk 14.0.1 2020-04-14
  OpenJDK Runtime Environment (build 14.0.1+7)
  OpenJDK 64-Bit Server VM (build 14.0.1+7, mixed mode, sharing)</code></p>
  
  <p>Any idea why it still can find an exectuable?</p>
  
  <p>I an other thread I read about a possible conflict between the pre-installed macOS Java-Version and the Orcalce Java-Version <a href="https://stackoverflow.com/a/18144853/11720573">enter link description here</a> but I couldn`t work it out..</p>
  
  <p>And could you explain to me the difference between java_home and JAVA_HOME?</p>