title: "package javax.xml.soap is declared in module java.xml.ws, which is not in the module graph"
body: <p>So I took the SOAP example at <a href="https://stackoverflow.com/questions/15948927/working-soap-client-example/15949858#15949858">Working Soap client example</a> , put it into a file <code>SOAPClientSAAJ.java</code>, and tried compiling it (Openjdk 9 on Debian):</p>
  
  <pre><code>t@h ~/javatest&gt; javac SOAPClientSAAJ.java 
  SOAPClientSAAJ.java:1: error: package javax.xml.soap is not visible
  import javax.xml.soap.*;
                  ^
    (package javax.xml.soap is declared in module java.xml.ws, which is not in the module graph)
  1 error
  </code></pre>
  
  <p>After Googling some, I found out that compiling and running as </p>
  
  <pre><code>t@h ~/javatest&gt; javac --add-modules java.xml.ws SOAPClientSAAJ.java
  t@h ~/javatest&gt; java --add-modules java.xml.ws SOAPClientSAAJ
  </code></pre>
  
  <p>works. See also this video for general background: <a href="https://www.youtube.com/watch?v=y8bpKYDrF5I&amp;t=20m17s" rel="noreferrer">https://www.youtube.com/watch?v=y8bpKYDrF5I&amp;t=20m17s</a></p>
  
  <p>Now, questions:</p>
  
  <ol>
  <li>Shouldn't the compiler automatically add the module java.xml.ws ? (since it obviously knows it is needed) Is this a bug in javax.xml.soap ?</li>
  <li>Why is the --add-modules option not documented in my man pages? (openjdk 9 in Debian)</li>
  <li>What should I write in the .java file to automatically add the java.xml.ws module?</li>
  </ol>