Closed samhutchins closed 9 months ago
There were some methods in Monocle which were changed in OpenJFX 12. Therefore the openjfx-monocle-jdk-11.x
releases cannot be used with OpenJFX 12. However, I did not face any trouble running openjfx-monocle-jdk-12.x
release against OpenJFX 13.
Just tested openjfx-monocle-jdk-12.0.1+2
with OpenJFX 14 and this also works.
I'd like to add that although monacle-jdk-12.0.1+2
works with Windows and MacOS < Catalina
with OpenJFX on MacOS > Catalina
the following issue occurs with Monocle. It appears it has been fixed in newer versions of OpenJDK so Monocle just needs to be rebuilt and then everything should function.
I have not tested to see if it has been back ported to OpenJDK 12 yet though.
Just tested
openjfx-monocle-jdk-12.0.1+2
with OpenJFX 14 and this also works.
Hi, Did you just modify the pom file to point to JavaFX 14? Thanks
@ValentinD45 I am using Kotlin with the javafx-gradle-plugin: https://github.com/openjfx/javafx-gradle-plugin There you can easily specify the JavaFX version and modules you want to use.
@belu org.testfx:openjfx-monocle:jdk-12.0.1+2
does not work for me using Java 14 + JavaFX 14, also using the javafx-gradle-plugin
:
plugins {
...
id 'org.openjfx.javafxplugin'
...
}
dependencies {
...
testCompile 'org.junit.jupiter:junit-jupiter'
testRuntime 'org.junit.jupiter:junit-jupiter-engine'
testCompile 'org.testfx:testfx-junit5:4.0.16-alpha'
testCompile 'org.testfx:openjfx-monocle:jdk-12.0.1+2'
}
javafx {
version = "14"
modules = ['javafx.controls', 'javafx.swing', 'javafx.fxml']
}
test {
useJUnitPlatform {
if (! project.hasProperty("noHeadless")) {
jvmArgs += "-Dheadless=true"
}
}
}
How did you do it please? Thanks
@octaviospain I am not using Java 14 but Kotlin (with Java 11 as JVM target). Here is my build.gradle:
plugins {
id 'application'
id 'org.jetbrains.kotlin.jvm' version '1.3.61'
id 'org.openjfx.javafxplugin' version '0.0.9'
}
group 'com.melonbase'
version '1.0-SNAPSHOT'
sourceCompatibility = 1.8
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib"
testCompile "org.testfx:testfx-core:4.0.16-alpha"
testCompile "org.testfx:testfx-junit5:4.0.16-alpha"
testCompile 'org.junit.jupiter:junit-jupiter-api:5.5.1'
testCompile group: 'org.hamcrest', name: 'hamcrest', version: '2.1'
testCompile "org.testfx:openjfx-monocle:jdk-12.0.1+2"
}
javafx {
version = "14"
modules = ['javafx.controls']
}
application {
mainClassName = "com.melonbase.AppMain"
}
test {
useJUnitPlatform()
}
compileKotlin {
kotlinOptions.jvmTarget = "11"
}
compileTestKotlin {
kotlinOptions.jvmTarget = "11"
}
We probably won't support JFX 13, but new builds for JFX 11 and 17 are new available: https://central.sonatype.com/artifact/org.testfx/openjfx-monocle/versions
Would it be possible to get a build of Monocle up from JDK 13? I'd like to use JavaFX 13, but I don't think I can run it against an older version of Monocle.
As an aside:
The readme suggests that the version of Monocle you use is tied to the version of Java you're using, but I don't think that's the case. Running JavaFX 13 on Java 11 is supported, but Monocle from OpenJDK 11 is missing methods required by JavaFX 13 (
com.sun.prims.Graphics.setPerspectiveTransform()
, for example). I think the readme should be updated to indicate that you want the version of Monocle and the version of JavaFX you're using to be in sync.