question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

run error in jpms and gradle 6.6

See original GitHub issue

My demo project uses gradle 6.6 , jpms structruce and javafxplugin 0.0.9. When I run then run task, an error occurs as follow

> org.joor.ReflectException: java.lang.NoSuchFieldException: javaExecHandleBuilder

If I change the gradle version to 6.5 or remove the module-info.java, the run task works fine

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:10
  • Comments:12

github_iconTop GitHub Comments

9reactions
jchildresscommented, Sep 8, 2020

Any update on this? I’m getting the same “error”…

org.joor.ReflectException: java.lang.NoSuchFieldException: javaExecHandleBuilder

5reactions
makhocheungcommented, Aug 27, 2020

@utybo Here is a simple way to configure a module JavaFx project in Gradle 6.6. 1

java {
    modularity.inferModulePath.set(true)
}

2

application{
    mainModule.set($moduleName)
    mainClass.set($mainClass)
}

3

dependencies {
    val jfxOptions = object {
        val group = "org.openjfx"
        val version = "14.0.2.1"
        val fxModules = arrayListOf("javafx-base","javafx-controls","javafx-graphics","javafx-media","javafx-swing")
    }
    jfxOptions.run {
        val osName = System.getProperty("os.name")
        val platform = when {
            osName.startsWith("Mac", ignoreCase = true) -> "mac"
            osName.startsWith("Windows", ignoreCase = true) -> "win"
            osName.startsWith("Linux", ignoreCase = true) -> "linux"
            else -> ""
        }
        fxModules.forEach {
            implementation("$group:$it:$version:$platform")
        }
    }
}

You can also see here

Read more comments on GitHub >

github_iconTop Results From Across the Web

JavaExec internal API spec seems to have changed in Gradle ...
The Gradle internal API appears to have changed so that the line: var hb = on(this).... ... run error in jpms and gradle...
Read more >
Gradle 6.4 Release Notes
With this release, Gradle supports the Java Module System with everything you need to compile and execute tests for Java modules. You can...
Read more >
Where do resource files go in a Gradle project that builds a ...
If you add an opens directive for a resource-only package you'll get an error at runtime. The cause of the error being that...
Read more >
Javalin with Java Platform Module System (JPMS) and Gradle
Change to new directory cd javalin-with-jpms-and-gradle # 3. ... if you were to run this application you'd end up with the following error:....
Read more >
Known issues with Android Studio and Android Gradle Plugin
Running JUnit tests may compile the code twice · To fix the issue for the current project, click Run > Edit Configurations and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found