问题
I'm trying to package a JavaFX/DukeScript application into native bundles. For Windows that's achieved with Inno Setup, that's what the javafxpackager uses. I can't find much documentation about it, so I'll create a question and provide the answers I find below.
Related questions: 1, 2, 3, 4
回答1:
So I've created a build.xml Ant script using e(fx)clipse (see example here). I've been following this excellent blog post. Now, the bundle task worked and produced an installer and executable app. I've been having trouble running the app and couldn't see a stack trace. So here's how to display a window with the stack trace when running the executable from the command line:
goGPS_FX.exe /Debug
That brings up a popup, with the stack trace. In my case, a jar dependency was missing. So just for testing, I manually added that jar under deploy\bundles\goGPS_FX\app\libs
.
For the JavaFX launcher to include this new jar, I need to modify the file app\package.cfg
.
As far as I understand, that's JavaFX specific, it's not needed by Inno Setup.
Also, I couldn't find much information about this file.
Anyway, there's a property called app.classpath
we can update.
The other relevant property is app.mainclass
. Here the mainclass is not specified with the standard dotted notation, but rather as a path:
app.mainclass=org/gogpsproject/GoGPS_Fx
Finally, other properties might be available. One I've found was:
jvmarg.1=-Djavafx.verbose=true
So that's a way to pass arguments to the jvm, should you need to.
来源:https://stackoverflow.com/questions/30835516/how-to-debug-problems-with-the-javafx-native-bundle-for-windows