【发布时间】:2020-08-14 18:00:05
【问题描述】:
我正在尝试从 3.9.0 标签的源代码https://github.com/nextgenhealthcare/connect 编译 mirth connect(但以前的版本也因同样的错误而失败)
目前我认为它需要用 java9+ 编译,因为它使用了一些 javafx 的东西,错误也表明:
[javac] Compiling 519 source files to /home/pwirth/code/connect/client/classes
[javac] /home/pwirth/code/connect/client/src/com/mirth/connect/client/ui/Frame.java:54: error: cannot access Platform
[javac] import javafx.application.Platform;
[javac] ^
[javac] bad class file: /home/pwirth/code/connect/client/lib/openjfx.jar(javafx/application/Platform.class)
[javac] class file has wrong version 54.0, should be 52.0
[javac] Please remove or make sure it appears in the correct subdirectory of the classpath.
另一方面,它使用自 java 9 以来不再可访问的类:
[javac] (package com.sun.rowset is declared in module java.sql.rowset, which does not export it)
[javac] /home/pwirth/code/connect/server/src/com/mirth/connect/server/userutil/MirthCachedRowSet.java:24: error: package com.sun.rowset is not visible
[javac] import com.sun.rowset.CachedRowSetImpl;
[javac] ^
[javac] (package com.sun.rowset is declared in module java.sql.rowset, which does not export it)
[javac] /home/pwirth/code/connect/server/src/com/mirth/connect/server/userutil/DatabaseConnection.java:128: error: incompatible types: MirthCachedRowSet cannot be converted to CachedRowSet
[javac] CachedRowSet crs = new MirthCachedRowSet();
我正在执行ant -f mirth-build.xml,并且当我的JAVA_HOME 指向一个java 11 时运行它时,它还带有ant 选项来打开模块,如readme.md 中所述,它声明了--add-modules=java.sql.rowset
【问题讨论】: