Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8287539

Unable to launch JavaFX app installed from bundle created via jpackage in Ubuntu

XMLWordPrintable

    • x86_64
    • linux_ubuntu

      ADDITIONAL SYSTEM INFORMATION :
      Ubuntu 18.04/20.04
      Java 15/16/17

      A DESCRIPTION OF THE PROBLEM :
      JavaFX application failes to launch with `Error: JavaFX runtime components are missing, and are required to run this application` on Linux platforms

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      1. git clone git@github.com:VladislavRHN/MyApp.git
      2. cd MyApp
      3. git co InstallBundle

      Prepare install bundle:

      4. mvn clean install
      5. mvn dependency:copy-dependencies
      6. cp target/where-1.0-SNAPSHOT.jar target/app
      7. mvn javafx:jlink
      8. jpackage --name myapp --input "target/app" --main-jar "where-1.0-SNAPSHOT.jar"

      Install prepared bundle:

      sudo dpkg -i myapp_1.0-1_amd64.deb
      (Reading database ... 254673 files and directories currently installed.)
      Preparing to unpack myapp_1.0-1_amd64.deb ...
      Unpacking myapp (1.0-1) over (1.0-1) ...
      Setting up myapp (1.0-1) ...

      Try to run installed app:

      /opt/myapp/bin/myapp


      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      javaFX application is launched
      ACTUAL -
      Error: JavaFX runtime components are missing, and are required to run this application

      ---------- BEGIN SOURCE ----------
      https://github.com/VladislavRHN/MyApp
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      modify
      /opt/myapp/lib/app/myapp.cfg:
      add to config:
      To end of the [Application]
      app.modulepath=$APPDIR/
      app.mainmodule=org.where.MyApp/org.where.MyApp

      FREQUENCY : always


            kcr Kevin Rushforth
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: