Error: Java FX Packager: Can not build artifact - fx: deploy is not available in this JDK

被刻印的时光 ゝ 提交于 2020-07-30 04:29:30

问题


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:

  1. create JavaFX
  2. add Java SE 14.0.1 as JDK
  3. add artifact
  4. 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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!