B4J Question B4J tray icon

yo3ggx

Active Member
Licensed User
Longtime User
Hello,

I'm using Erel example from here to minimize my B4J app in the tray.
It works as expected in IDE (both release and debug), but when I run it using java.exe using the same jdk11 package (downloaded from B4X) the app crashes with the following error:
Error in the DOS console.:
java.lang.NoClassDefFoundError: javafx/embed/swing/SwingFXUtils
        at anywheresoftware.b4j.objects.SystemTrayWrapper$TrayIconWrapper.Initialize(SystemTrayWrapper.java:69)

Any hints?

Thank you.
Dan
 

yo3ggx

Active Member
Licensed User
Longtime User
As I cannot remove my initial post, answer to myself ....
Changed the command line from:
B4X:
C:\java11\java.exe -jar --module-path C:\java11\javafx\lib --add-modules javafx.controls myapp.jar
to
B4X:
C:\java11\java.exe -jar --module-path C:\java11\javafx\lib --add-modules javafx.controls,javafx.swing myapp.jar]

Maybe this will help others too.

Dan
 
Upvote 0
Top