title: why do I get "The type GraphicsContext from module javafx.graphics may not be accessible to clients due to missing 'requires transitive'" warning?
body: <p>Whenever I create a GraphicsContext object in my JavaFX application, it creates an error that reads:</p>
  <blockquote>
  <p>The type GraphicsContext from module javafx.graphics may not be accessible to clients due to missing 'requires transitive'</p>
  </blockquote>
  <p>Here's a small example of code which causes the warning/ error:</p>
  <pre><code>import javafx.scene.canvas.GraphicsContext;
  
      public Factory(GraphicsContext gc) {
          super();
          this.gc = gc;
      }
  </code></pre>
  <p>The GraphicsContext is underlined in the warning colour, and has 3 quick fixes suggested by eclipse. 2 of them include adding @SuppressWarnings which does not fix the problem at all and the other &quot;Configure Problem Serverity&quot; which I think just tells eclipse to not worry about the issue.</p>
  <p>This code works perfectly when ran in eclipse but when I export as a runnable JAR file, the file closes immediately. I would like the classes to be accessible to clients as GraphicsContexts are funsamental to my application.</p>
  <p>I also get the same error when I use the JavaFX class stage.</p>
  <blockquote>
  <p>The type Stage from module javafx.graphics may not be accessible to clients due to missing 'requires transitive'</p>
  </blockquote>
  <p>I am using eclipse and jdk-16</p>
  <p>How/where in my program do I include 'requires transitive'? Or is there a differnt problem hidden by this warning?</p>