beryx / badass-runtime-plugin

Create a custom runtime image of your non-modular application
https://badass-runtime-plugin.beryx.org
Apache License 2.0
162 stars 21 forks source link

How to diagnose why application won't start? #123

Closed NomadicDeveloper22 closed 2 years ago

NomadicDeveloper22 commented 2 years ago

I managed to create the installer successfully for my javafx project. It installs. But when I go to run it, nothing happens. I even set noConsole = false, but the console disappears within a split second and I don't think anything is printed. I also tried running the shortcut through powershell and that doesn't print any errors (or anything at all), it just ends the command really quick.

I am also using an error reporting service in my application (BugSnag), and that doesn't appear to be receiving any errors, but I don't think its getting initialized quick enough.

is there some way to view a log of what is happening? If it is throwing any readable error for me know where to start

My build.gradle:

runtime {
    options = ['--strip-debug', '--compress', '2', '--no-header-files', '--no-man-pages']
    launcher {
        //noConsole = true
    }
    jpackage {
        installerName = 'Chance Installer'
        installerType = 'msi'
        imageOptions += ['--icon', "src/main/resources/images/icon.ico",'--win-console']
        installerOptions += ['--resource-dir', "src/main/resources"]
        installerOptions += ['--win-per-user-install', '--win-dir-chooser', '--win-menu', '--win-shortcut']
        installerOptions += ['--vendor', 'Chance Software LLC']
    }
}

I very closely followed the javafx example project and still ended up with not being able to launch the application (other than directly through intelij)

I played around with uninstalling, and trying again by passing jvmArgs for javafx even though the example projected didn't do that. I don't have anything regarding a manifest in my build.gradle, could that be it?

I also am using: id 'org.openjfx.javafxplugin' version '0.0.12'

Platform: Windows 11 Java version: 17

NomadicDeveloper22 commented 2 years ago

Found out it was due to not having a separate launcher class for others with the same issue