3

I'm trying to run a JavaFX app on Windows. It runs fine on Ubuntu. But on Windows I'm getting the error "Failed to load Glass factory class". A Class Not Found Exception.

Failed to load Glass factory class

edit...

It seems JavaFX jars are not cross platform. Compiling on Linux doesn't create a jar that runs on Windows. Compiling on Windows and including the JavaFX jars in the compile creates a jar that runs even without JavaFX installed.

Harley
  • 1,305
  • 1
  • 13
  • 28
  • Did you miss any files? It seems that some JavaFX classes are available but others aren't – airsquared Apr 17 '20 at 00:44
  • When I copy the jfx files to the jdk... alot of file names are the same and I have not been overwriting any files. Do you think maybe overwrites? I'll give it a go. – Harley Apr 17 '20 at 01:14
  • Overwriting the files makes no difference. Same error. – Harley Apr 17 '20 at 01:16
  • 2
    no screenshots of text please - they are unreadable. it's text which can be ... c&p'ed ;) – kleopatra Apr 17 '20 at 08:19

1 Answers1

4

You can try using Azul's Zulu OpenJDK builds, which bundle OpenJFX, even for JDK 11.

enter image description here

airsquared
  • 571
  • 1
  • 8
  • 25
  • 2
    This has worked. It wasn't quite the answer I had hoped for. I'd like to know what I did wrong when adding the OpenJFX files to the OpenJDK. But you've got me out of trouble for the meantime. Upvoted... it might be the accepted answer if nothing better turns up. Thanks a bunch. – Harley Apr 17 '20 at 08:29