文章目录
背景回顾
博主在做项目是,需要查看parquet文件,考虑到没有现成的exe程序或在线解析网站,就找到了这个工具BigDataFileViewer
github仓库地址
gitee仓库地址
但是在按教程步骤进行是发生了报错。报错信息如下
python
[INFO]
[INFO] --- clean:3.1.0:clean (default-clean) @ BigdataFileViewer ---
[INFO]
[INFO] --- resources:3.1.0:resources (default-resources) @ BigdataFileViewer ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 0 resource
[INFO] Copying 3 resources
[INFO]
[INFO] --- compiler:3.8.1:compile (default-compile) @ BigdataFileViewer ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 33 source files to D:\Program Files (x86)\BigDataFileViewer\bigdata-file-viewer\target\classes
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
原因解析
然而在仓库链接内pom.xml
中依赖项中包含两个版本的JavaFx
依赖
xml
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-controls</artifactId>
<version>11.0.2</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-media</artifactId>
<version>17.0.10</version>
</dependency>
<dependency>
<groupId>org.openjfx</groupId>
<artifactId>javafx-graphics</artifactId>
<version>11</version>
</dependency>
因此需要在mvn
构建时指定系统java
版本号
解决方法
在命令行窗口执行
bash
C:\Users\Administrator>javac -version
javac 17.0.12
查看java
版本,根据自己的版本选择新的mvn
构建方式
此处博主的java
版本为17.0.12
,因此执行指令
bash
mvn clean install -Pjava17
顺利解决报错!
此处附上成功截图:

希望大家通过教程顺利解决自己的问题!