title: GlassFish requires Java SE version 6. Your JDK is version 0 (Mac)
body: <p>I'm doing a project in IntelliJ with GlassFish and it throws this error: </p>
  
  <blockquote>
    <p>GlassFish requires Java SE version 6.  Your JDK is version 0. </p>
  </blockquote>
  
  <p>I ran the <code>glassfish4/bin/asadmin start-domain</code> command in a terminal but still get the same error.</p>
  
  <p>I do have Java SE installed, SDK version 8u152 (I checked on Java Panel). Also, I don't know why it searches for jdk 9.</p>
  
  <p><a href="https://i.stack.imgur.com/He9O2.png" rel="noreferrer"><img src="https://i.stack.imgur.com/He9O2.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/YtqN9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/YtqN9.png" alt="enter image description here"></a></p>