JavaFX classes not found by the editor

Answered

Hello,
I've set up a simple Gradle project using Kotlin and TornadoFX (the Kotlin wrapper for JavaFX). The project compiles and runs without any issue, both from the command line and from the editor.
However, Intellij IDEA's editor itself is unable to find any javafx-related class, and, as a result, marks any line referencing them as erroneous. Autocompletion thus also fails for those.

What could possibly be wrong? For the record, I'm using OpenJDK8 under Debian Linux. I also installed the extra OpenJFX package supplied by Debian.

Here's the content of the build.gradle file:

plugins {
id 'java'
id 'org.jetbrains.kotlin.jvm' version '1.3.11'
id 'application'
}

group 'eu.lauwenmark.infrabel'
version '1.0-SNAPSHOT'

sourceCompatibility = 1.8

repositories {
mavenCentral()
maven{ url "https://www.jetbrains.com/intellij-repository/releases"}
maven{ url "https://jetbrains.bintray.com/intellij-third-party-dependencies"}
}

dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
testCompile group: 'junit', name: 'junit', version: '4.12'
compile "io.github.microutils:kotlin-logging:1.5.4"
compile "ch.qos.logback:logback-classic:1.2.3"
compile "commons-cli:commons-cli:1.4"
compile "no.tornado:tornadofx:1.7.18"
}

compileKotlin {
kotlinOptions.jvmTarget = "1.8"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "1.8"
}

if (!hasProperty('mainClass')) {
ext.mainClass = 'eu.lauwenmark.infrabel.tesinterpreter.MainKt'
mainClassName = 'eu.lauwenmark.infrabel.tesinterpreter.MainKt'
}

 

0
1 comment

Could you please provide a sample project to check?

0

Please sign in to leave a comment.