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

runtime won't produce any JRE #19

Closed jscancella closed 3 years ago

jscancella commented 4 years ago

When I run .\gradlew.bat runtime and I try and run build\install\SuperDeDuper\bin\SuperDeDuper.bat it errors saying that there isn't a proper JRE installed. Isn't .\gradlew.bat runtime supposed to generate a JRE for the application?

Here is a link to my build file: https://github.com/jscancella/deduplicator/blob/8fce42a1b8af7ac69735cf796a652a7d0266e242/build.gradle based on the example JavaFX you have.

jscancella commented 4 years ago

After changing to use java.exe instead of javaw.exe I see the error

Error: JavaFX runtime components are missing, and are required to run this application

Why are they not being detected when they are present in build\image\lib?

Srijan-Sengupta commented 4 years ago

See this please.

siordache commented 4 years ago

@jscancella You should use build\image\bin\SuperDeDuper.bat instead of build\install\SuperDeDuper\bin\SuperDeDuper.bat.

kaushalyap commented 3 years ago

@siordache when I execute one in the image it says

Error: JavaFX runtime components are missing, and are required to run this application

Any way to fix this? Please help

siordache commented 3 years ago

Do you have a Launcher class for your application?

kaushalyap commented 3 years ago

@siordache thanks for quick reply, it was not there, but I add it as follows, since I am using Kotlin

package example.app

object Launcher {
    @JvmStatic
    fun main(args: Array<String>) {
        App.main(args)
    }
}

still getting the same error.

siordache commented 3 years ago

Did you also update the mainClass in build.gradle.kts?

application {
    mainClass.set("example.app.LauncherKt")
}
kaushalyap commented 3 years ago

@siordache thanks a lot it does work now. there should not be a Kt postfix at the end though.