You are not logged in.

#1 2018-01-01 19:11:10

ripread
Member
Registered: 2013-02-13
Posts: 6

Issues with JavaFX when running pdfsam

I just installed pdfsam along with the javafx and java-9 dependencies. However as soon as pdfsam tries to draw its window the program crashes. From the stacktrace it looks like javafx just isn't linked right but I don't know enough about how java works to link it

I've set my env so I know it's using the right java
   

JAVA_HOME=/usr/lib/jvm/java-9-openjdk

And here's the stacktrace

Exception in thread "main" java.lang.NoClassDefFoundError: javafx/scene/layout/HBox
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1007)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
        at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:801)
        at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(BuiltinClassLoader.java:699)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622)
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
        at org.pdfsam.community.App.main(App.java:34)
Caused by: java.lang.ClassNotFoundException: javafx.scene.layout.HBox
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:185)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:496)
        ... 10 more

Offline

#2 2018-01-01 21:48:58

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: Issues with JavaFX when running pdfsam

You usually don't have to set your env manually, and that might be the problem, just set the correct environment using archlinux-java FWIW depending on what the program depends on  you might be better off with openjdk 8 in general, since 9 did contain some changes that might render certain programs unbootable. I'm not entirely sure if java 9 would need it's own openjfx package or if it can use the libraries from the java 8 release.

If your end goal is to simply run the program using java 8 will avoid a few potential gotchas anyway.

Last edited by V1del (2018-01-01 21:49:39)

Offline

#3 2018-01-01 21:56:33

ripread
Member
Registered: 2013-02-13
Posts: 6

Re: Issues with JavaFX when running pdfsam

Wow, switching to java 8 did help. Thanks!

Offline

#4 2018-01-02 03:47:47

WFV
Member
From: ☭USSA⛧⭒⭒⭒⭒
Registered: 2013-04-23
Posts: 290

Re: Issues with JavaFX when running pdfsam

...switching to java 8 did help.

Hi ripread, there's also the Wiki option if you want to keep your default environment java9, although may have to be aware of it if/when pdfsam updates to java9. I put the script in /usr/bin, called it "pdfsam_run" and then changed the pdfsam launcher in /usr/share/applications to it.


∞ hard times make the strong, the strong make good times, good times make the weak, the weak make hard times ∞

Offline

#5 2018-01-02 11:26:00

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,435

Re: Issues with JavaFX when running pdfsam

FWIW for java 9 we indeed do not have the openjfx libraries currently: https://bugs.archlinux.org/task/55776

Please mark as [SOLVED] by editing the title of your first post

Offline

Board footer

Powered by FluxBB