title: jlink not using automatic modules
body: <p>I created a '.exe' file for a JavaFX application on Windows 10 using jpackage. Afterward, by double-clicking on the application's icon, the app did not start. I realized that I mistakenly used this command, which is tailored for none modular application:</p>
  <pre><code>jpackage --input app-directory --main-jar jar-file [--main-class main-class]
  </code></pre>
  <p>Now I am trying to use the proper command syntax from Oracle doc for Modular application:</p>
  <pre><code>jpackage --module-path module-path --module main-module[/class]
  </code></pre>
  <p>Here is my command based on the syntax given by Oracle:</p>
  <pre><code>jpackage -p &quot;%JAVAFX_HOME%\lib;%M2_REPO%;org\openjfx\mavenfxedittableview\mavenfxedittableview.jar&quot; --module &quot;org.openjfx.mavenfxedittableview/org.openjfx.mavenfxedittableview.TableEditApp&quot;
  </code></pre>
  <p>However, I am getting an error regarding jlink not using automatic modules: The error message:</p>
  <pre><code>WARNING: Using incubator modules: jdk.incubator.jpackage
  jlink failed with: Error: automatic module cannot be used with jlink: javafx.swt from file:///C:/Program%20Files/java/jFX/javafx-sdk-14.0.2.1/lib/javafx-swt.jar
  </code></pre>
  <p>My application module name in the module-info.class is</p>
  <pre><code>module org.openjfx.mavenfxedittableview {
  requires javafx.controls;
  requires javafx.fxml;
  requires java.base;
  requires java.prefs;
  requires transitive java.xml.bind;
  
  opens org.openjfx.mavenfxedittableview to java.xml.bind, javafx.fxml;
  exports org.openjfx.mavenfxedittableview;
      
  }
  </code></pre>
  <p>The application main is org.openjfx.mavenfxedittableview.TableEditApp and the org\openjfx\mavenfxedittableview directory structure is a relative path within the &quot;c:\sample&quot; directory.</p>
  <p>The build classes are:</p>
  <pre><code> Directory of C:\Sample\org\openjfx\mavenfxedittableview
  
  09/09/2020  10:32 PM    &lt;DIR&gt;          .
  09/09/2020  10:32 PM    &lt;DIR&gt;          ..
  09/09/2020  08:36 PM             2,502 addressBookData.xml
  09/09/2020  08:36 PM             9,562 Address_Book.png
  09/09/2020  08:36 PM               859 birthdaystatistic.fxml
  09/09/2020  08:36 PM             3,274 BirthdaystatisticController.class
  09/09/2020  08:36 PM             3,224 DarkTheme.css
  09/09/2020  08:36 PM             2,072 DateUtil.class
  09/09/2020  08:36 PM             1,214 LocalDateAdapter.class
  09/09/2020  10:32 PM            34,004 mavenfxedittableview.jar
  09/09/2020  08:36 PM             3,523 Person.class
  09/09/2020  08:36 PM             4,535 personeditdialog.fxml
  09/09/2020  08:36 PM             5,128 PersoneditdialogController.class
  09/09/2020  08:36 PM             1,029 PersonListWrapper.class
  09/09/2020  08:36 PM             6,412 personoverview.fxml
  09/09/2020  08:36 PM             1,904 rootlayout.fxml
  09/09/2020  08:36 PM             4,490 RootlayoutController.class
  09/09/2020  08:36 PM             9,060 TableEditApp.class
  09/09/2020  08:36 PM             6,812 TableVieweditController.class
                17 File(s)         99,604 bytes
                 2 Dir(s)  56,574,193,664 bytes free 
  </code></pre>
  <br>
  Here is the content of the application jar file:
  <pre><code>     0 Wed Sep 09 22:32:14 IRDT 2020 META-INF/
     125 Wed Sep 09 22:32:14 IRDT 2020 META-INF/MANIFEST.MF
    2502 Wed Sep 09 20:36:28 IRDT 2020 org/openjfx/mavenfxedittableview/addressBookData.xml
    9562 Wed Sep 09 20:36:28 IRDT 2020 org/openjfx/mavenfxedittableview/Address_Book.png
     859 Wed Sep 09 20:36:28 IRDT 2020 org/openjfx/mavenfxedittableview/birthdaystatistic.fxml
    3274 Wed Sep 09 20:36:30 IRDT 2020 org/openjfx/mavenfxedittableview/BirthdaystatisticController.class
    3224 Wed Sep 09 20:36:28 IRDT 2020 org/openjfx/mavenfxedittableview/DarkTheme.css
    2072 Wed Sep 09 20:36:30 IRDT 2020 org/openjfx/mavenfxedittableview/DateUtil.class
    1214 Wed Sep 09 20:36:30 IRDT 2020 org/openjfx/mavenfxedittableview/LocalDateAdapter.class
    3523 Wed Sep 09 20:36:30 IRDT 2020 org/openjfx/mavenfxedittableview/Person.class
    4535 Wed Sep 09 20:36:28 IRDT 2020 org/openjfx/mavenfxedittableview/personeditdialog.fxml
    5128 Wed Sep 09 20:36:30 IRDT 2020 org/openjfx/mavenfxedittableview/PersoneditdialogController.class
    1029 Wed Sep 09 20:36:30 IRDT 2020 org/openjfx/mavenfxedittableview/PersonListWrapper.class
    6412 Wed Sep 09 20:36:28 IRDT 2020 org/openjfx/mavenfxedittableview/personoverview.fxml
    1904 Wed Sep 09 20:36:28 IRDT 2020 org/openjfx/mavenfxedittableview/rootlayout.fxml
    4490 Wed Sep 09 20:36:30 IRDT 2020 org/openjfx/mavenfxedittableview/RootlayoutController.class
    9060 Wed Sep 09 20:36:30 IRDT 2020 org/openjfx/mavenfxedittableview/TableEditApp.class
    6812 Wed Sep 09 20:36:30 IRDT 2020 org/openjfx/mavenfxedittableview/TableVieweditController.class
     349 Wed Sep 09 22:32:14 IRDT 2020 module-info.class
  </code></pre>
  <p><br>This is the jar manifest file:</p>
  <pre><code>Manifest-Version: 1.0
  Main-Class: org.openjfx.mavenfxedittableview.TableEditApp
  Created-By: 14.0.2 (Oracle Corporation)
  </code></pre>
  <p>Finally, I found out about this Maven plugin ModiTect:</p>
  <pre><code>https://www.youtube.com/watch?v=BhuOSGrNBek
  </code></pre>
  <p>, which embeds a descriptor into the jar file of an automatic module, however that would be extremely tedious and time-consuming since the culprit automatic module is not even in my module descriptor. This implies that I might have to go through the .m2 repository and convert them one by one. Are there better work arounds?</p>
  <p>Thanks</p>