edvin / tornadofx

Lightweight JavaFX Framework for Kotlin
Apache License 2.0
3.68k stars 272 forks source link

CSS url handler error #1282

Open NicolaM94 opened 4 years ago

NicolaM94 commented 4 years ago

Hello, I'm trying to approach Tornado for the first time, I followed the guidelines but I can't make my app run properly, I always get stuck at this error:

Oct 01, 2020 11:03:52 PM tornadofx.Stylesheet$Companion detectAndInstallUrlHandler INFO: Installing CSS url handler, since it was not picked up automatically

I'm currently working on Ubuntu 20.04 and after reading about the problems with OpenJDK 8 and JavaFx I moved to OpenJDK11, removing OpenJDK8, so that I don't have concurrent versions problems. Still can't find a way to run my app.

Here is my gradle build:

plugins {
    id 'groovy'
    id 'java'
    id 'org.jetbrains.kotlin.jvm' version '1.4.10'
    id 'application'
    id 'org.openjfx.javafxplugin' version '0.0.8'
}

group 'org.example'
version '1.0-SNAPSHOT'

repositories {
    mavenCentral()
}

javafx {
    version = "11.0.2"
    modules = ['javafx.controls','javafx.graphics']
}

dependencies {
    compile 'org.codehaus.groovy:groovy-all:2.3.11'
    implementation "org.jetbrains.kotlin:kotlin-stdlib"
    testCompile group: 'junit', name: 'junit', version: '4.12'
    implementation 'no.tornado:tornadofx:1.7.20'
}

compileKotlin {
    kotlinOptions.jvmTarget = "11"
}

compileTestKotlin {
    kotlinOptions.jvmTarget = "11"

}

And my simple Kotlin code:

import tornadofx.*

class MyApp :App(MyView::class)

class MyView :View () {
    override val root = hbox{
        label("Ciao!")
    }
}

fun main() {
    MyApp()
}

Intellij settings attached. Screenshot_20201001_232052 Screenshot_20201001_232132-2

Can someone help me to understand where I'm doing wrong? Thanks a lot!

SchweinchenFuntik commented 4 years ago

support javafx 9+ starts in Tornadofx2 https://github.com/edvin/tornadofx/tree/jdk10 . report bugs in https://github.com/edvin/tornadofx2. better ask questions here https://kotlinlang.slack.com/#tornadofx