我正在尝试从3.9.0标记编译来自源https://github.com/nextgenhealthcare/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
我过去使用oracle java 8编译了mirth 3.8,它解决了您的问题,但是我是在Oracle更改许可之前安装的。
根据您的使用情况,您仍然可以从Oracle出于开发目的而获得它。
那个Mirth类可能应该固定为不直接依赖com.sun.rowset.CachedRowSetImpl
。
有完全相同的问题,但实际上有三个选择: