asciidocfx / AsciidocFX

Asciidoc Editor and Toolchain written with JavaFX 21 (Build PDF, Epub, Mobi and HTML books, documents and slides)
http://www.asciidocfx.com/
Apache License 2.0
1.91k stars 298 forks source link

Fails using AdoptOpenJDK JRE #419

Closed Bill-Stewart closed 5 years ago

Bill-Stewart commented 5 years ago

Installed AsciiDocFX 1.6.9 without JRE. I have AdoptOpenJDK 8.0.212.04 (x64) installed (Windows 10). Running AsciidocFX.exe gives a failure dialog:

Startup Error
An error has occurred during startup:
java.lang.NoClassDefFoundError: javafx/application/Application
  at java.lang.ClassLoader.defineClass1(Native Method)
  at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
  at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
  at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
  at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
  at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
  at java.security.AccessController.doPrivileged(Native Method)
  at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:81)
  at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:94)
  at com.install4j.runtime.launcher.WinLauncher.main(WinLauncher.java:25)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
  at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  ... 15 more

Also tried creating a jre directory link in the AsciidocFX directory to the AdoptOpenJDK JRE directory, but the same error occurs.

Need support for other JREs since Oracle has changed the licensing for their JRE.

rahmanusta commented 5 years ago

Can you please try v1.7.0 https://github.com/asciidocfx/AsciidocFX/releases/tag/v1.7.0 ?

Bill-Stewart commented 5 years ago

Yes the 1.7 version works with the included JRE. It does not work if I remove the jre directory and link the AdoptOpenJDK 1.8.0_212 jre directory. Is there a way to make it work without using an included JRE?

rahmanusta commented 5 years ago

Hi, we use AdoptOpenJDK 12, I think it may work if you use OpenJDK 12 + include JavaFX 12 jars in lib directory. However, I recommend using bundled JRE because it already uses OpendJDK 12.

Bill-Stewart commented 5 years ago

Understood. I think it is good to move to AdoptOpenJDK instead of Oracle to avoid licensing issues. I will close this issue. Thank you!

rahmanusta commented 5 years ago

Great, thanks 👍 ;)