beryx-gist / badass-runtime-example-javafx

A small JavaFX application that shows how to use the Badass Runtime Plugin
Apache License 2.0
25 stars 3 forks source link

No value has been specified for property 'jpackageData.jpackageHome' #30

Closed danielemaddaluno closed 3 years ago

danielemaddaluno commented 3 years ago

I have imported in IntelliJ the project on my macOS. I have succesfully run ./gradlew runtime that generates a working image. When I launch ./gradlew jpackage I got this error:

madx@Danieles-MacBook-Pro badass-runtime-example-javafx-master % ./gradlew jpackage

> Configure project :
Project : => no module-info.java found

> Task :jpackageImage FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':jpackageImage' (type 'JPackageImageTask').
> No value has been specified for property 'jpackageData.jpackageHome'.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 834ms
7 actionable tasks: 1 executed, 6 up-to-date
madx@Danieles-MacBook-Pro badass-runtime-example-javafx-master % 

What am I missing? Thank you in advance!

siordache commented 3 years ago

You probably run Gradle with a Java distribution that doesn't contain the jpackage tool. In this case, you can specify the path to a JDK that provides jpackage by using one of the methods shown in the documentation. For example, you can set the environment variable BADASS_RUNTIME_JPACKAGE_HOME, or you can configure jpackageHome in your build.gradle:

runtime {
    ...
    jpackage {
        jpackageHome = "/usr/lib/jvm/jdk15"
        ...
    }
}
danielemaddaluno commented 3 years ago

Yeah... it was my fault, I was using: jpackageHome = "/Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/" that has no jpackage. This one worked perfectly fine: jpackageHome = "/Library/Java/JavaVirtualMachines/liberica-jdk-15-full.jdk/Contents/Home/" Thank you again!