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
486 stars 48 forks source link

Does not compile #19

Closed suuuehgi closed 5 years ago

suuuehgi commented 5 years ago
$ ./gradlew distZip
> Task :compileJava FAILED
Briss-2.0/src/main/java/at/laborg/briss/BrissGUI.java:28: error: package javafx.application does not exist
import javafx.application.Platform;
                         ^
Briss-2.0/src/main/java/at/laborg/briss/BrissGUI.java:29: error: package javafx.embed.swing does not exist
import javafx.embed.swing.JFXPanel;
                         ^
Briss-2.0/src/main/java/at/laborg/briss/BrissGUI.java:30: error: package javafx.stage does not exist
import javafx.stage.FileChooser;
                   ^
Briss-2.0/src/main/java/at/laborg/briss/BrissGUI.java:73: error: cannot find symbol
    private final FileChooser fileChooser;
                  ^
  symbol:   class FileChooser
  location: class BrissGUI
Briss-2.0/src/main/java/at/laborg/briss/BrissGUI.java:87: error: cannot find symbol
        new JFXPanel(); // used for initializing javafx thread
            ^
  symbol:   class JFXPanel
  location: class BrissGUI
Briss-2.0/src/main/java/at/laborg/briss/BrissGUI.java:88: error: cannot find symbol
        fileChooser = new FileChooser();
                          ^
  symbol:   class FileChooser
  location: class BrissGUI
Briss-2.0/src/main/java/at/laborg/briss/BrissGUI.java:94: error: package FileChooser does not exist
        FileChooser.ExtensionFilter pdfFilter = new FileChooser.ExtensionFilter("PDF files (*.pdf)", "*.pdf");
                   ^
Briss-2.0/src/main/java/at/laborg/briss/BrissGUI.java:94: error: package FileChooser does not exist
        FileChooser.ExtensionFilter pdfFilter = new FileChooser.ExtensionFilter("PDF files (*.pdf)", "*.pdf");
                                                               ^
Briss-2.0/src/main/java/at/laborg/briss/BrissGUI.java:278: error: cannot find symbol
        Platform.runLater(() -> {
        ^
  symbol:   variable Platform
  location: class BrissGUI
Briss-2.0/src/main/java/at/laborg/briss/BrissGUI.java:291: error: cannot find symbol
        Platform.runLater(() -> {
        ^
  symbol:   variable Platform
  location: class BrissGUI
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Briss-2.0/src/main/java/at/laborg/briss/utils/FileDrop.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
10 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* 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
1 actionable task: 1 executed

Installed is openjfx 11.0.2 as well as openjdk-11-jre.

Would it be possible to add a precompiled jar file, like Briss .9 has?

cleydyr commented 5 years ago

I can confirm this behavior occurs when using Open JDK 11. However, AFAIK the repo was not designed to count on JavaFX as a separate module, as is the case when using JDK 11. That's expected behavior for now.

suuuehgi commented 5 years ago

That's expected behavior for now.

Eh if it's expected to break, I would appreciate a little hint about it on the README.

mbaeuerle commented 5 years ago

What @cleydyr refered to is that at the moment you need JDK 8 to build Briss as JDK 11 introduces a separate module for JavaFX which breaks the build. I have updated the Readme accordingly.

I'm closing this issue, feel free to open it again if you cannot make it work with JDK 8.

suuuehgi commented 5 years ago

Thank you! That clarifies it!