2

I am trying to run a basic Gluon Mobile application in the InteliJ IDEA IDE. I believe I have all the required dependencies installed. When I create a new Gluon Mobile Single View project and try to run the destop application without changing any code I get the following error.

> Task :TESTApp:run FAILED
Exception in Application start method
Exception in thread "main" java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    at java.base/sun.launcher.LauncherHelper$FXHelper.main(LauncherHelper.java:1051)
Caused by: java.lang.RuntimeException: Exception in Application start method
Caused by: java.lang.RuntimeException: Exception in Application start method

    at javafx.graphics/com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:973)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:198)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.NoClassDefFoundError: com/sun/javafx/css/converters/SizeConverter
Caused by: java.lang.NoClassDefFoundError: com/sun/javafx/css/converters/SizeConverter

    at com.gluonhq.charm.glisten.control.AppBar.<clinit>(SourceFile:409)
    at com.gluonhq.charm.glisten.application.MobileApplication.start(SourceFile:203)
    at javafx.graphics/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:919)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$11(PlatformImpl.java:449)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$9(PlatformImpl.java:418)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:417)
    at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at javafx.graphics/com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
    ... 1 more
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.css.converters.SizeConverter
Caused by: java.lang.ClassNotFoundException: com.sun.javafx.css.converters.SizeConverter

    at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:582)
    at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 11 more

Execution failed for task ':TESTApp:run'.
> Process 'command '/home/nick/.IntelliJIdea2019.3/config/jdks/jbsdk11b125_linux_x64/bin/java'' finished with non-zero exit value 1

I've looked around online and I haven't come up with an idea of what to try. The build task seems to be fine here is the output of that:

7:58:46 PM: Executing task 'build'...

> Task :assemble UP-TO-DATE
> Task :check UP-TO-DATE
> Task :build UP-TO-DATE
> Task :TESTApp:compileJava
> Task :TESTApp:processResources
> Task :TESTApp:classes
> Task :TESTApp:compileDesktopJava NO-SOURCE
> Task :TESTApp:processDesktopResources NO-SOURCE
> Task :TESTApp:desktopClasses UP-TO-DATE
> Task :TESTApp:jar
> Task :TESTApp:startScripts
> Task :TESTApp:distTar
> Task :TESTApp:distZip
> Task :TESTApp:assemble
> Task :TESTApp:compileTestJava NO-SOURCE
> Task :TESTApp:processTestResources NO-SOURCE
> Task :TESTApp:testClasses UP-TO-DATE
> Task :TESTApp:test NO-SOURCE
> Task :TESTApp:check UP-TO-DATE
> Task :TESTApp:build

BUILD SUCCESSFUL in 0s
6 actionable tasks: 6 executed
7:58:47 PM: Task execution finished 'build'.

  • System
    • Ubuntu 18.04-lts
    • Linux 4.15.0-1065-oem
  • IDE
    • IntelliJ IDEA 2019.3.1 (Ultimate Edition)
    • Build #IU-193.5662.53, built on December 17, 2019
    • Runtime version: 11-ea+125 amd64
    • VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
  • JavaFX
    • 11.0.2+1-1~18.04.2

The IDE creates two build.gradle files, one in the top level directory and one in the source directory. The top level file has only one line: apply plugin: 'base' The build file in the src directory is more interesting:

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'org.javafxports:jfxmobile-plugin:1.3.17'
    }
}

apply plugin: 'org.javafxports.jfxmobile'

repositories {
    jcenter()
    maven {
        url 'http://nexus.gluonhq.com/nexus/content/repositories/releases'
    }
}

mainClassName = 'com.tenman.TESTApp'

dependencies {
    compile 'com.gluonhq:charm:5.0.2'
}

jfxmobile {
    downConfig {
        version = '3.8.6'
        // Do not edit the line below. Use Gluon Mobile Settings in your project context menu instead
        plugins 'display', 'lifecycle', 'statusbar', 'storage'
    }
}

Thank you for any thoughts or ideas on what to try.

Physineer
  • 21
  • 2
  • The Gluon IDE plugin still creates projects that use the `jfxmobile` plugin, that works _only_ with Java 1.8. If you want to create new projects with Java 11+ you have to check the [Client plugin](https://github.com/gluonhq/client-maven-plugin/), [samples](https://github.com/gluonhq/client-samples) and [archetypes](https://github.com/gluonhq/client-maven-archetypes). It is still work in progress, and an IDE plugin will be available soon. – José Pereda Jan 15 '20 at 09:04
  • I tried the fifty states sample and it gives the exact same error. – Physineer Jan 18 '20 at 03:33
  • [fifty-states](https://github.com/gluonhq/gluon-samples/tree/master/fifty-states) gluon example – Physineer Jan 18 '20 at 04:03
  • I got this working thanks to the comment above and help from Konstantin at JetBrains. Just had to get java 8 and javafx 8 installed. Thanks. – Physineer Jan 21 '20 at 03:42

0 Answers0