title: Mac OS and java.lang.NullPointerException at java.awt.Window.init(Window.java:497)
body: <p>I've been setting up a 2018 MacBook Pro for Java development. It's running Mojave 10.14.1 - just like the older machine I'm migrating from, an early 2013 MacBook Pro. I installed Java 1.8.0_192 and immediately noticed that I could not launch jars or any Java app that had a UI on this mac. I uninstalled and tried each of these: 1.8.0_172, 1.8.0_191, 1.8.0_192, and 11.0.1. I traced the issue further and found a common error:</p>
  
  <pre><code>Caused by: java.lang.NullPointerException
    at java.awt.Window.init(Window.java:497)
    at java.awt.Window.&lt;init&gt;(Window.java:537)
    at java.awt.Frame.&lt;init&gt;(Frame.java:420)
    at java.awt.Frame.&lt;init&gt;(Frame.java:385)
    at javax.swing.SwingUtilities$SharedOwnerFrame.&lt;init&gt;(SwingUtilities.java:1763)
    at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1838)
    at javax.swing.JWindow.&lt;init&gt;(JWindow.java:187)
    at javax.swing.JWindow.&lt;init&gt;(JWindow.java:139) 
  </code></pre>
  
  <p>Curious, I launched our Swing-based product and it reported the same error. I googled and found only unanswered posts.</p>
  
  <p>(revising this to be formatted as a question and not a blog post)</p>
  
  <p>What gives?</p>