简体   繁体   中英

Created .exe from jpackager crashes

I have a JavaFX Project, which I want to export as a dmg and exe. The export as a dmg file for Mac was no problem. But the export as a.exe file for Windows is not working. I created a jar file and I ran jlink. Then I exported the project with jpackage. Here is the command:

/path/to/jpackage \
--input %PATH_TO_SDK%/lib/  \
--name "My Project" \
--main-jar /path/to/jar.jar \
--main-class com.company.project.Main \
--type exe \
--add-modules javafx.controls,javafx.fxml,javafx.graphics \
--module-path %PATH_TO_SDK%/lib/

On my machine, it is working perfect, but on others (I tested it on two more machines (they do not have Java(FX) installed)) the CMD window crashes instantly.

After a lot of research, I found a GitHub repo which shows how to create dmg and exe files. Maven jPackage Template

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM