Closed yatschki closed 6 years ago
here is my build.gradle file
apply plugin: 'java' apply plugin: 'no.tornado.fxlauncher'
group 'no.tornado' version '1.0'
sourceCompatibility = 1.8 [compileJava, compileTestJava].options.encoding = 'UTF-8'
if (!hasProperty('mainClass')) { ext.mainClass = 'main.Main' }
buildscript { repositories { mavenCentral() } dependencies { classpath 'no.tornado:fxlauncher-gradle-plugin:1.0.16' } }
fxlauncher { applicationVendor 'My Company' applicationUrl 'xxxx' applicationMainClass 'main.Main' acceptDowngrade false }
repositories { mavenLocal() mavenCentral() }
dependencies { testCompile group: 'junit', name: 'junit', version: '4.12' compile 'com.h2database:h2:1.4.196' compile 'com.google.code.gson:gson:2.8.2' compile files('libs/ObiLibrary.jar') compile 'org.controlsfx:controlsfx:8.40.12' }
jar { manifest.attributes 'Main-Class': 'main.Main' from configurations.compile.collect { it.isDirectory() ? it : zipTree(it) } }
Hi Yatschki,
The issue lies in the version of JDK, if you compile it in JDK 8 you will not have an issue, the reason for this is from JDK 9 and up Oracle have removed access to internal API's and as that particular module was one of them they no longer have access to it. This may mean that Edvin and co will need to make a work around for the XML handlers it may mean writing their own handler using javax.xml.stream modules.
Hope that helps explain the situation, I am sure they guys are looking into it however.
Yeah, that’s correct. TornadoFX is not yet compatible with JDK9, but we are working on it in a separate branch :)
Hi guys,
first of all sorry for my bad English 😅
I try to figure out how to make the FXlauncher compatible with JDK 10. When I try to do it with JDK 1.8 everything is okay, except the native installer. The task creates the installer but when I try to run the app it says:
logging to /var/folders/ww/gmr01s910kn1nmx3tzdpdjqw0000gn/T//fxlauncher.log Exception in thread "FXLauncher-Thread" java.lang.NoClassDefFoundError: javax/xml/bind/JAXB at fxlauncher.AbstractLauncher.syncManifest(AbstractLauncher.java:201) at fxlauncher.AbstractLauncher.updateManifest(AbstractLauncher.java:92) at fxlauncher.Launcher.lambda$start$0(Launcher.java:137) at java.base/java.lang.Thread.run(Thread.java:844) Caused by: java.lang.ClassNotFoundException: javax.xml.bind.JAXB at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:190) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:499) ... 4 more
But if I change it to JDK 10 these tasks don't work anymore:
copyAppDependencies generateApplicationManifest embedApplicationManifest generateNativeInstaller
For example: 00:38:53: Executing task 'generateApplicationManifest'...
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':generateApplicationManifest'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 0s 5 actionable tasks: 2 executed, 3 up-to-date Unable to load class 'javax.xml.bind.JAXB'. Possible causes for this unexpected error include:
- Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)
- The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)
- Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.
In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes. 00:38:53: Task execution finished 'generateApplicationManifest'.Do I miss something ?