title: The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt
body: <p>I am using M1 Mac OS11.5.2.<br />
  I've already downloaded zulu.jdk and zulu.jre, in &quot;/Library/Java/JavaVirtualMachines&quot;.<br />
  I also exported the PATH.</p>
  <pre><code>echo export &quot;JAVA_HOME=\$(/usr/libexec/java_home)&quot; &gt;&gt; ~/.bash_profile
  </code></pre>
  <p>When I type</p>
  <pre><code>sudo apt update
  </code></pre>
  <p>I get this:</p>
  <blockquote>
  <p>The operation couldn’t be completed. Unable to locate a Java Runtime that supports apt.<br />
  Please visit <a href="http://www.java.com" rel="noreferrer">http://www.java.com</a> for information on installing Java.</p>
  </blockquote>
  <p>I hope some kind person could tell me the solution.</p>