问题
I have since 3 months problems with my javafx application, the problem is that I can't build my javafx application. When I build this error occurs:
Error: Java FX Packager: Can not build artifact - fx: deploy is not available in this JDK
I am using Java SE 14.0.1.
My steps:
- create JavaFX
- add Java SE 14.0.1 as JDK
- add artifact
- build
How can I fix the error? I want my javafx application to be runnable on mac, windows and linux.
Is there a way to do this?
回答1:
This error message is pretty clear, isn't it? The old Java FX Packager does not exist anymore. The new tool to use is "jpackage" which is part of JDK 14. In order to create a platform specific executable image you have to specify --type app-image
.
https://docs.oracle.com/en/java/javase/14/docs/specs/man/jpackage.html
And here is even a tutorial project with complete code which I co-authored. Have a look at: https://github.com/dlemmermann/JPackageScriptFX
来源:https://stackoverflow.com/questions/62781620/error-java-fx-packager-can-not-build-artifact-fx-deploy-is-not-available-in