title: How to point /usr/libexec/java_home to custom jdk installation?
body: <p>I'm on macOS monterrey and using a custom JDK 15 (I have to use a custom JDK modified for my company). When I run <code>/usr/libexec/java_home</code> I get this error:</p>
  <pre><code>The operation couldn’t be completed. Unable to locate a Java Runtime.
  Please visit http://www.java.com for information on installing Java.
  </code></pre>
  <p>however when I run <code>echo $JAVA_HOME</code> I get <code>/Library/Java/JavaVirtualMachines/openjdk_15.0.6_15.38.18_x64</code>. In addition running <code>java --version</code> return the correct JDK version.</p>
  <p>Because <code>/usr/libexec/java_home</code> doesn't point to the actual JDK directory tools which use Java don't work.</p>
  <p>Is there a way to set <code>/usr/libexec/java_home</code> to point to my JDK directory?</p>