6

I'm trying to deploy a very basic JavaFX application. I'm just creating a new JavaFX project and trying to deploy it to .exe but it gives me a module not found error.

This is the console log:

Buildfile: D:\eclipseProjects\Test\build\build.xml
setup-staging-area:
   [delete] Deleting directory D:\eclipseProjects\Test\build\externalLibs
   [delete] Deleting directory D:\eclipseProjects\Test\build\project
   [delete] Deleting directory D:\eclipseProjects\Test\build\projectRefs
    [mkdir] Created dir: D:\eclipseProjects\Test\build\externalLibs
     [copy] Copying 1 file to D:\eclipseProjects\Test\build\externalLibs
     [copy] Copying 1 file to D:\eclipseProjects\Test\build\externalLibs
     [copy] Copying 1 file to D:\eclipseProjects\Test\build\externalLibs
     [copy] Copying 1 file to D:\eclipseProjects\Test\build\externalLibs
     [copy] Copying 1 file to D:\eclipseProjects\Test\build\externalLibs
     [copy] Copying 1 file to D:\eclipseProjects\Test\build\externalLibs
     [copy] Copying 1 file to D:\eclipseProjects\Test\build\externalLibs
     [copy] Copying 1 file to D:\eclipseProjects\Test\build\externalLibs
    [mkdir] Created dir: D:\eclipseProjects\Test\build\project
     [copy] Copying 5 files to D:\eclipseProjects\Test\build\project
    [mkdir] Created dir: D:\eclipseProjects\Test\build\projectRefs
do-compile:
   [delete] Deleting directory D:\eclipseProjects\Test\build\build
    [mkdir] Created dir: D:\eclipseProjects\Test\build\build\src
    [mkdir] Created dir: D:\eclipseProjects\Test\build\build\libs
    [mkdir] Created dir: D:\eclipseProjects\Test\build\build\classes
     [copy] Copying 8 files to D:\eclipseProjects\Test\build\build\libs
     [copy] Copying 5 files to D:\eclipseProjects\Test\build\build\src
    [javac] Compiling 3 source files to D:\eclipseProjects\Test\build\build\classes
    [javac] D:\eclipseProjects\Test\build\build\src\module-info.java:2: error: module not found: javafx.fxml
    [javac]     requires javafx.fxml;
    [javac]                    ^
    [javac] D:\eclipseProjects\Test\build\build\src\module-info.java:3: error: module not found: javafx.graphics
    [javac]     requires javafx.graphics;
    [javac]                    ^
    [javac] 2 errors

BUILD FAILED
D:\eclipseProjects\Test\build\build.xml:101: Compile failed; see the compiler error output for details.

Total time: 2 seconds

I'm using jdk11.0.4, JavaFX-11.0.2, eclipse 4.12.0 with e(fx)clipse 3.5

Hamlet
  • 307
  • 1
  • 8
  • were you able to solve it? I have the same problem. – Nighty42 Jun 15 '20 at 15:40
  • Can you show us your lib folder path? – Yoshi Jun 15 '20 at 15:43
  • I solved it by adding a lib folder to the project with a subfolder "dll" which contains the dll files from the javafx installation directory and its subfolder "bin". I had to add this folder to the classpath (build-paths of the project). – Nighty42 Jun 17 '20 at 15:33
  • the problem is that it throws the error when reading the module-info.java file – Hamlet Jun 30 '20 at 15:17
  • i couldn't make it work, but i found another way to export a javafx app as exe. With the new jpackage tool in the jdk 14 you can package your app into exe or msi for windows and the other extensions for linux and mac. this is not a solution for the question i posted but is a workaround – Hamlet Jul 15 '20 at 20:20

0 Answers0