0

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

2 Answers2

0

There have been issues in this direction with jpackage. Maybe it helps to use the latest version from the 16-ea release.

mipa
  • 10,369
  • 2
  • 16
  • 35
  • so download the 16-ea and replace the --module-path in the command? There's no 'lib' folder that has the javafx jars in the 16-ea though? – Denton Lister Feb 08 '21 at 08:15
  • I said use the JDK 16-ea and not JavaFX 16-ea (although you could). Your setup structure does not change. – mipa Feb 08 '21 at 08:28
0

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