foreword
- The project that is normally compiled locally is abnormal when it is compiled on the server
- Server: TencentOS Server 3.1
- jdk:openjdk version “1.8.0_352” / OpenJDK Runtime Environment (Tencent Kona 8.0.12) (build 1.8.0_352-b1)
mistake
package javafx.scene.layout does not exist
- Missing JavaFX library
Solution 1
<dependency>
<groupId>jre_lib</groupId>
<artifactId>jfxrt</artifactId>
<version>1.8</version>
<scope>system</scope>
<systemPath>${basedir}/src/main/jre_lib/jfxrt.jar</systemPath>
</dependency>
项目目录/src/main/jre_lib
In the directory where jfxrt.jar is copied
Solution 2
Copy jfxrt.jar to $JAVA_HOME/jre/lib/ext
the directory
$JAVA_HOME
for the jdk directory