Search code examples
javamacosjavafxjpackage

error -10810 with JavaFX jpackage application


This is my command for making the executable application:jpackage --input Desktop/java\ project --main-jar javaproject.jar --module-path /Users/Denton/Desktop/javafx-sdk-15.0.1/lib --add-modules javafx.controls,javafx.fxml

I'm on MacOS and when trying to open it, I get this error: LSOpenURLsWithRole() failed with error -10810 on the command line. I'm not entirely sure I got the command correct. (If needed,) The info.plist file is:

<?xml version="1.0" ?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "https://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
 <dict>
  <key>LSMinimumSystemVersion</key>
  <string>10.9</string>
  <key>CFBundleDevelopmentRegion</key>
  <string>English</string>
  <key>CFBundleAllowMixedLocalizations</key>
  <true/>
  <key>CFBundleExecutable</key>
  <string>Main</string>
  <key>CFBundleIconFile</key>
  <string>Main.icns</string>
  <key>CFBundleIdentifier</key>
  <string>application</string>
  <key>CFBundleInfoDictionaryVersion</key>
  <string>6.0</string>
  <key>CFBundleName</key>
  <string>Main</string>
  <key>CFBundlePackageType</key>
  <string>APPL</string>
  <key>CFBundleShortVersionString</key>
  <string>1.0</string>
  <key>CFBundleSignature</key>
  <string>????</string>
  <!-- See https://developer.apple.com/app-store/categories/ for list of AppStore categories -->
  <key>LSApplicationCategoryType</key>
  <string>Unknown</string>
  <key>CFBundleVersion</key>
  <string>1.0</string>
  <key>NSHumanReadableCopyright</key>
  <string>Copyright (C) 2021</string>
  <key>NSHighResolutionCapable</key>
  <string>true</string>
 </dict>
</plist>

The .jar file runs on the command line with command: java --module-path /Users/Denton/Desktop/javafx-sdk-15.0.1/lib --add-modules javafx.controls,javafx.fxml -jar Desktop/java \project javaproject.jar


Solution

  • Had to download the jmods and use that for --module-path instead.