title: Mixed Modular and Non-Modular Development in Eclipse using Java 11
body: <p>It's been a while since I do Java programming and I am surprised to come back to it with the entire landscape being foreign to me post project jig-saw.</p>
  
  <p>I have trouble using Eclipse (2018-09, 4.9.0) standard Java project with mixed modular and non-modular environment. Specifically, I am attempting to combine JavaFX 11 (modularized) and Apache POI 4.1 (non-modularized) using Eclipse platform (base Java project without Gradle or Maven).</p>
  
  <p>In my module-info.java I have the following,</p>
  
  <pre><code>module myapp {
          requires javafx.base;
          requires javafx.graphics;
          requires javafx.fxml;
          requires javafx.controls;
          requires javafx.web;
  
          exports myapp.gui;
  
          opens myapp.gui to javafx.fxml;
  }
  </code></pre>
  
  <p>I find that wherever I have the Apache POI code I get the following error in Eclipse</p>
  
  <pre><code>The import cannot be resolved
  </code></pre>
  
  <p>Adding the following in the module-info.java using the automatic module created for Apache POI like so, </p>
  
  <pre><code>        requires poi;
  </code></pre>
  
  <p>Produces a warning in Eclipse indicating automatic module is not stable which seems to be recognized but continue to produce the cannot be resolved error.</p>
  
  <p>I have also tried putting the main POI jar file in class path as oppose to module-path with no avail.</p>
  
  <p>The code involving Apache POI in separation from the UI works. I simply have to remove the use of module-info.java which I assume puts the project in some sort of legacy development mode sans modularization?</p>
  
  <p>Can someone give me a pointer as to what I am doing wrong and guide me to setup a project with mixed modularized and non-modularized libraries?</p>
  
  <p>Thanks in advance.</p>