title: Can't open file on macOS - FileNotFoundException, Operation not permitted
body: <p>It's a simple program:</p>
  <pre><code>new FileInputStream(&quot;/Users/me/Desktop/foo.png&quot;)
  </code></pre>
  <p>I'm trying to run it from IntelliJ and I get:</p>
  <blockquote>
  <p>Exception in thread &quot;main&quot; java.io.FileNotFoundException: /Users/me/Desktop/foo.png (Operation not permitted)</p>
  </blockquote>
  <p>The unix perms are the usual <code>rw-r--r--</code>. It's something to do with macOS's extra security.</p>
  <p>How can I open files in Java programs on macOS now?</p>
  <p>This is macOS 11.0 beta (Big Sur). Maybe it was happening before 11.0 too; I don't know.</p>