title: jdk 11 - package javax.xml.bind.annotation is declared in the unnamed module, but module javax.xml.bind.annotation does not read it
body: <p>I red all other topics (maybe work for jdk 10) and still have problem to run <code>javax.xml.bind</code> on <strong>jdk 11</strong>.</p>
  
  <p><strong>My dependency:</strong></p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;
          &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;
          &lt;version&gt;2.4.0-b180830.0359&lt;/version&gt;                   &lt;!--  2.2.12, 2.3.1  --&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jaxb&lt;/groupId&gt;
          &lt;artifactId&gt;jaxb-runtime&lt;/artifactId&gt;
          &lt;version&gt;2.4.0-b180830.0438&lt;/version&gt;                   &lt;!-- 2.3.1 --&gt;
          &lt;!--&lt;scope&gt;compile&lt;/scope&gt;--&gt;
          &lt;!--&lt;scope&gt;runtime&lt;/scope&gt;--&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.activation&lt;/groupId&gt;
          &lt;artifactId&gt;javax.activation-api&lt;/artifactId&gt;
          &lt;version&gt;1.2.0&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.annotation&lt;/groupId&gt;
          &lt;artifactId&gt;javax.annotation-api&lt;/artifactId&gt;
          &lt;version&gt;1.3.2&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>My IDE (newest intellij) still doesn't see import:</p>
  
  <pre><code>import javax.xml.bind.annotation.XmlAccessType;
  </code></pre>
  
  <p>Also my module-info.java doesnt see:</p>
  
  <pre><code>requires java.xml.bind;
  </code></pre>
  
  <p>And when i use maven i have an error:</p>
  
  <blockquote>
    <p>[ERROR] ...ExceptionType.java:[6,22] package javax.xml.bind.annotation is not visible
      (package javax.xml.bind.annotation is declared in the unnamed module, but module javax.xml.bind.annotation does not read it)</p>
  </blockquote>
  
  <p>anybody run it on jdk 11 ?</p>
  
  <p>edit:
  1) App version with java module system:
  i have similar problem to this:
  <a href="https://youtrack.jetbrains.com/issue/IDEA-197956" rel="nofollow noreferrer">https://youtrack.jetbrains.com/issue/IDEA-197956</a>
  but my error message is a little difrent</p>
  
  <p>2) App version without java module system:
  Maven compile correctly. Problem is that intellij dont see my imports:</p>
  
  <pre><code>import javax.xml.bind.JAXBContext;
  import javax.xml.bind.JAXBException;
  import javax.xml.bind.Marshaller;
  import javax.xml.bind.Unmarshaller;
  </code></pre>
  
  <p>and say: cannot resolve symbol.
  Also at file > project structure > modules > dependencies intellij didnt add javax.xml.bind and org.glassfish.jaxb
  Why?
  I added this in pom:</p>
  
  <pre><code>    &lt;dependency&gt;
          &lt;groupId&gt;javax.xml.bind&lt;/groupId&gt;
          &lt;artifactId&gt;jaxb-api&lt;/artifactId&gt;
          &lt;version&gt;2.4.0-b180830.0359&lt;/version&gt;                   &lt;!-- 2.2.8, 2.4.0-b180830.0359  --&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.jaxb&lt;/groupId&gt;
          &lt;artifactId&gt;jaxb-runtime&lt;/artifactId&gt;
          &lt;version&gt;2.4.0-b180830.0438&lt;/version&gt;                   &lt;!-- 2.3.0, 2.4.0-b180830.0438 --&gt;
      &lt;/dependency&gt;
  </code></pre>
  
  <p>JDK: openjdk11
  Intellij version: IntelliJ IDEA 2018.2.4 (Ultimate Edition), Build #IU-182.4505.22, built on September 18, 2018, JRE: 1.8.0_152-release-1248-b8 amd64
  JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  Maven:3.5.4</p>
  
  <p>It seems to be a intellij bug.</p>