문제

I'm trying to build an application using the JavaFX WebEngine inside of a swing gui. Gradle complains about not finding the JavaFX packages. How can I tell gradle to include the appropriate jar?

도움이 되었습니까?

해결책

I assume you are using jdk 7. Add the jfxrt.jar from your jre/lib directory to the build as a file dependency, or install it into your repository. This is not necessary if you are compiling with jdk 8.

You might also have to put new JFXPanel() at the beginning of your Swing app to start the JavaFX thread.

There is also a gradle-javafx plugin that is recommended. https://bitbucket.org/shemnon/javafx-gradle

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top