Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monocle support for JavaFX 13 #79

Closed
samhutchins opened this issue Oct 14, 2019 · 8 comments
Closed

Monocle support for JavaFX 13 #79

samhutchins opened this issue Oct 14, 2019 · 8 comments

Comments

@samhutchins
Copy link

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.

@abhinayagarwal
Copy link

abhinayagarwal commented Apr 19, 2020

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.

@ghost
Copy link

ghost commented Apr 25, 2020

Just tested openjfx-monocle-jdk-12.0.1+2 with OpenJFX 14 and this also works.

@IanSaucy
Copy link

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.

@ValentinD45
Copy link

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

@ghost
Copy link

ghost commented Sep 4, 2020

@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.

@octaviospain
Copy link

octaviospain commented Nov 4, 2020

@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

@ghost
Copy link

ghost commented Nov 6, 2020

@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"
}

@mvsoder
Copy link
Collaborator

mvsoder commented Feb 11, 2024

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

@mvsoder mvsoder closed this as completed Feb 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants