mbaeuerle / Briss-2.0

Briss 2.0 is intended to be a GUI Update for the Briss PDF cropping tool.
GNU General Public License v3.0
499 stars 48 forks source link

Build fails when using JDK 8 #27

Closed cleydyr closed 2 years ago

cleydyr commented 4 years ago

Steps to reproduce

  1. checkout master or download source zip file based on branch master
  2. on the project root folder, run ./gradlew distZip

Expected behavior

The project builds successfully.

Current behavior

The build fails with an error message (see below).

Reproduced on master 066f376641cc119ddd021866c402662dd252df01

Java version

java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)

Also tested with Docker container (imageopenjdk:8-buster)

openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

Console output/errors

FAILURE: Build failed with an exception.

* What went wrong:
java.lang.UnsupportedClassVersionError: org/openjfx/gradle/JavaFXPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
> org/openjfx/gradle/JavaFXPlugin has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 1s
mbaeuerle commented 4 years ago

Hi @cleydyr. Failing to build with JDK 8 is unfortunately the outcome of making Briss work for newer Java versions. As JavaFX was removed from all Java versions above 8 I had to add the external dependency for it. Because this external dependency is just available compiled for later versions than 8 you see this error. I am not sure if there is a way to still support (compiling with) Java 8 alongside supporting newer versions.

mbaeuerle commented 2 years ago

I'll close this issue for now. I think JDK 8 is not widely used any longer.