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

Can't execute Briss 2.0 on Windows 11 #68

Closed cleydyr closed 1 year ago

cleydyr commented 1 year ago

Windows 11 Home 21H2 (22000.613)

Java version

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

Execute Briss-2.0.bat and get the following stacktrace:

Exception in thread "main" java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel
        at at.laborg.briss.BrissGUI.<init>(BrissGUI.java:148)
        at at.laborg.briss.Briss.main(Briss.java:34)
Caused by: java.lang.ClassNotFoundException: javafx.embed.swing.JFXPanel
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
        ... 2 more
mbaeuerle commented 1 year ago

This JavaFX is giving us much trouble and headache. It was just added because the Swing file chooser is not native and looks very ugly IMO. But it seems like the old AWT FileDialog is native and at least at the moment still works (this needs to be verified for Linux and Win 10 / 11). I'll create a PR for that + a build maybe you can test if that works with Win 11?

mbaeuerle commented 1 year ago

@cleydyr please check out the new version here which possibly works again with Win 11

cleydyr commented 1 year ago

With JRE 8, yes. But not with JRE 18.

mbaeuerle commented 1 year ago

So what's the error for JRE 18?

cleydyr commented 1 year ago

There's no error. But never mind.

Checking it further, I saw that the window's position was outside the screen, so that I couldn't see it. So no bug here, but ensuring the window appears on (0,0) to override any fancy JVM's defaults would be interesting.

mbaeuerle commented 1 year ago

Interesting, I also observed on Windows 10 that the Briss window was opened on the bottom right. I thought it should be centered. Would be also nice to store the previous position and size as user config somewhere (and while we're at it also the previously chosen file paths).

cleydyr commented 1 year ago

Opened https://github.com/mbaeuerle/Briss-2.0/issues/70 to track your suggestion.

cleydyr commented 1 year ago

I also observed on Windows 10 that the Briss window was opened on the bottom right

Found the root cause. See https://github.com/mbaeuerle/Briss-2.0/issues/72