JavaFX-11 error while deploying: module not found
Asked Answered
M

0

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

Meatball answered 26/9, 2019 at 13:48 Comment(5)
were you able to solve it? I have the same problem.Quip
Can you show us your lib folder path?Desai
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).Quip
the problem is that it throws the error when reading the module-info.java fileMeatball
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 workaroundMeatball

© 2022 - 2024 — McMap. All rights reserved.