Migration to JDK 11 + JavaFX 11 giving RuntimeException

a 夏天 提交于 2019-11-27 14:49:06

So, there are some missing librairies.

  • On Windows, the missing DLL from javafx-sdk-11/bin are at least prism_d3d.dll, prism_sw.dll, javafx_font.dll, glass.dll; you can put all into the jdk directory C:\Program Files\Java\jdk[...]\bin (It's not the best solution), or into the jlink directory for a custom JRE, inside [...]\jlink\bin\ .

  • On Linux, the missing .so from javafx-sdk-11/lib are at least libprism_es2.os, libprism_sw.so, libglass.so, libglassgtk3.so (and libglassgtk2.so probably too for old configuration), libjavafx_font.so, libjavafx_font_freetype.so, libjavafx_font_pango.so; you can put all into the /usr/lib/jvm/java-11[...]/lib for example (It's not the best solution), or into the jlink directory for a custom JRE, inside [...]/jlink/lib .

  • On Mac, the missing .dylib from jav javafx-sdk-11/lib must be (I suppose!) libprism_es2.dylib, libprism_sw.dylib, libglass.dylib, libjavafx_font.dylib [To confirm].

To use the jlink, you should use the jmods - no need to use the librairy files.

And my module-info.java was not really complete:

module AutoGeneratorOpenData {
   requires sqlite.jdbc;
   requires javafx.controls;
   requires javafx.graphics;
   requires java.sql;
   requires java.desktop;
   requires javafx.fxml;
   requires javafx.base;    

   exports autogeneratoropendata;
   exports autogeneratoropendata.controller;    
   exports autogeneratoropendata.model;   
   exports autogeneratoropendata.util;

   opens autogeneratoropendata.controller;
}

Now it's working.

On Windows, updated PATH variable to contain javafx-sdk-11/bin.

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