Start Jar in Linux “javafx/application/Application”

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















System Information is:



sudo update-alternatives --config java

Selection Path Priority Status
------------------------------------------------------------
0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
* 1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode


Linux Version is:



cat /proc/version
Linux version 4.19.0-kali3-amd64 (devel@kali.org) (gcc version 8.2.0 (Debian 8.2.0-16)) #1 SMP Debian 4.19.20-1kali1 (2019-02-14)


Java Version:



java -version
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment (build 11.0.2+9-Debian-3)
OpenJDK 64-Bit Server VM (build 11.0.2+9-Debian-3, mixed mode, sharing)


The error when trying to execute the .jar:



java -jar any_game.jar 
Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:398)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)
Caused by: java.lang.ClassNotFoundException: javafx.application.Application
at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
... 13 more


I've tried to change the Java version in dpkg --config, but it didn't work.










share|improve this question






























    0















    System Information is:



    sudo update-alternatives --config java

    Selection Path Priority Status
    ------------------------------------------------------------
    0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
    * 1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
    2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode


    Linux Version is:



    cat /proc/version
    Linux version 4.19.0-kali3-amd64 (devel@kali.org) (gcc version 8.2.0 (Debian 8.2.0-16)) #1 SMP Debian 4.19.20-1kali1 (2019-02-14)


    Java Version:



    java -version
    openjdk version "11.0.2" 2019-01-15
    OpenJDK Runtime Environment (build 11.0.2+9-Debian-3)
    OpenJDK 64-Bit Server VM (build 11.0.2+9-Debian-3, mixed mode, sharing)


    The error when trying to execute the .jar:



    java -jar any_game.jar 
    Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
    at java.base/java.lang.ClassLoader.defineClass1(Native Method)
    at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
    at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
    at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
    at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
    at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:398)
    at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)
    Caused by: java.lang.ClassNotFoundException: javafx.application.Application
    at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
    at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
    ... 13 more


    I've tried to change the Java version in dpkg --config, but it didn't work.










    share|improve this question


























      0












      0








      0








      System Information is:



      sudo update-alternatives --config java

      Selection Path Priority Status
      ------------------------------------------------------------
      0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
      * 1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
      2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode


      Linux Version is:



      cat /proc/version
      Linux version 4.19.0-kali3-amd64 (devel@kali.org) (gcc version 8.2.0 (Debian 8.2.0-16)) #1 SMP Debian 4.19.20-1kali1 (2019-02-14)


      Java Version:



      java -version
      openjdk version "11.0.2" 2019-01-15
      OpenJDK Runtime Environment (build 11.0.2+9-Debian-3)
      OpenJDK 64-Bit Server VM (build 11.0.2+9-Debian-3, mixed mode, sharing)


      The error when trying to execute the .jar:



      java -jar any_game.jar 
      Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
      at java.base/java.lang.ClassLoader.defineClass1(Native Method)
      at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
      at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
      at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
      at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
      at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      at java.base/java.lang.Class.forName0(Native Method)
      at java.base/java.lang.Class.forName(Class.java:398)
      at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)
      Caused by: java.lang.ClassNotFoundException: javafx.application.Application
      at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      ... 13 more


      I've tried to change the Java version in dpkg --config, but it didn't work.










      share|improve this question
















      System Information is:



      sudo update-alternatives --config java

      Selection Path Priority Status
      ------------------------------------------------------------
      0 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 auto mode
      * 1 /usr/lib/jvm/java-11-openjdk-amd64/bin/java 1111 manual mode
      2 /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java 1081 manual mode


      Linux Version is:



      cat /proc/version
      Linux version 4.19.0-kali3-amd64 (devel@kali.org) (gcc version 8.2.0 (Debian 8.2.0-16)) #1 SMP Debian 4.19.20-1kali1 (2019-02-14)


      Java Version:



      java -version
      openjdk version "11.0.2" 2019-01-15
      OpenJDK Runtime Environment (build 11.0.2+9-Debian-3)
      OpenJDK 64-Bit Server VM (build 11.0.2+9-Debian-3, mixed mode, sharing)


      The error when trying to execute the .jar:



      java -jar any_game.jar 
      Exception in thread "main" java.lang.NoClassDefFoundError: javafx/application/Application
      at java.base/java.lang.ClassLoader.defineClass1(Native Method)
      at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
      at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
      at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:550)
      at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:458)
      at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:452)
      at java.base/java.security.AccessController.doPrivileged(Native Method)
      at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:451)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      at java.base/java.lang.Class.forName0(Native Method)
      at java.base/java.lang.Class.forName(Class.java:398)
      at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:56)
      Caused by: java.lang.ClassNotFoundException: javafx.application.Application
      at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:471)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:588)
      at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:521)
      ... 13 more


      I've tried to change the Java version in dpkg --config, but it didn't work.







      linux java






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 8 at 14:08









      Rui F Ribeiro

      41.9k1483142




      41.9k1483142










      asked Mar 8 at 13:08









      Ja BushJa Bush

      11




      11




















          1 Answer
          1






          active

          oldest

          votes


















          0














          You must install openjfxpackage for support of JavaFX applications
          Also you will need to install libraries like libopenjfx-java, libopenjfx-jni.
          Maybe you will need to add the path to CLASS_PATH



          export CLASS_PATH=$CLASS_PATH:/usr/share/java/openjfx/lib/





          share|improve this answer

























          • sudo apt policy openjfx openjfx: Installed: 11.0.2+1-1 Candidate: 11.0.2+1-1 Version table: *** 11.0.2+1-1 500 500 http.kali.org/kali kali-rolling/main amd64 Packages 100 /var/lib/dpkg/status

            – Ja Bush
            Mar 8 at 13:36











          • It is already installed but doesn't work for some reason and I dont know why...

            – Ja Bush
            Mar 8 at 13:36











          • @JaBush, check where are located classes of JavaFX and add the dir in CLASS_PATH vairable

            – Romeo Ninov
            Mar 8 at 13:47











          • How do I check that? @Romeo Ninov

            – Ja Bush
            Mar 8 at 13:57






          • 1





            I didn't notice you updated it, I'll try it asap and reply-back then or just mark the answer as solved, depending on the outcome

            – Ja Bush
            Mar 8 at 14:07











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f505130%2fstart-jar-in-linux-javafx-application-application%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          You must install openjfxpackage for support of JavaFX applications
          Also you will need to install libraries like libopenjfx-java, libopenjfx-jni.
          Maybe you will need to add the path to CLASS_PATH



          export CLASS_PATH=$CLASS_PATH:/usr/share/java/openjfx/lib/





          share|improve this answer

























          • sudo apt policy openjfx openjfx: Installed: 11.0.2+1-1 Candidate: 11.0.2+1-1 Version table: *** 11.0.2+1-1 500 500 http.kali.org/kali kali-rolling/main amd64 Packages 100 /var/lib/dpkg/status

            – Ja Bush
            Mar 8 at 13:36











          • It is already installed but doesn't work for some reason and I dont know why...

            – Ja Bush
            Mar 8 at 13:36











          • @JaBush, check where are located classes of JavaFX and add the dir in CLASS_PATH vairable

            – Romeo Ninov
            Mar 8 at 13:47











          • How do I check that? @Romeo Ninov

            – Ja Bush
            Mar 8 at 13:57






          • 1





            I didn't notice you updated it, I'll try it asap and reply-back then or just mark the answer as solved, depending on the outcome

            – Ja Bush
            Mar 8 at 14:07















          0














          You must install openjfxpackage for support of JavaFX applications
          Also you will need to install libraries like libopenjfx-java, libopenjfx-jni.
          Maybe you will need to add the path to CLASS_PATH



          export CLASS_PATH=$CLASS_PATH:/usr/share/java/openjfx/lib/





          share|improve this answer

























          • sudo apt policy openjfx openjfx: Installed: 11.0.2+1-1 Candidate: 11.0.2+1-1 Version table: *** 11.0.2+1-1 500 500 http.kali.org/kali kali-rolling/main amd64 Packages 100 /var/lib/dpkg/status

            – Ja Bush
            Mar 8 at 13:36











          • It is already installed but doesn't work for some reason and I dont know why...

            – Ja Bush
            Mar 8 at 13:36











          • @JaBush, check where are located classes of JavaFX and add the dir in CLASS_PATH vairable

            – Romeo Ninov
            Mar 8 at 13:47











          • How do I check that? @Romeo Ninov

            – Ja Bush
            Mar 8 at 13:57






          • 1





            I didn't notice you updated it, I'll try it asap and reply-back then or just mark the answer as solved, depending on the outcome

            – Ja Bush
            Mar 8 at 14:07













          0












          0








          0







          You must install openjfxpackage for support of JavaFX applications
          Also you will need to install libraries like libopenjfx-java, libopenjfx-jni.
          Maybe you will need to add the path to CLASS_PATH



          export CLASS_PATH=$CLASS_PATH:/usr/share/java/openjfx/lib/





          share|improve this answer















          You must install openjfxpackage for support of JavaFX applications
          Also you will need to install libraries like libopenjfx-java, libopenjfx-jni.
          Maybe you will need to add the path to CLASS_PATH



          export CLASS_PATH=$CLASS_PATH:/usr/share/java/openjfx/lib/






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited Mar 8 at 13:50

























          answered Mar 8 at 13:12









          Romeo NinovRomeo Ninov

          6,93432129




          6,93432129












          • sudo apt policy openjfx openjfx: Installed: 11.0.2+1-1 Candidate: 11.0.2+1-1 Version table: *** 11.0.2+1-1 500 500 http.kali.org/kali kali-rolling/main amd64 Packages 100 /var/lib/dpkg/status

            – Ja Bush
            Mar 8 at 13:36











          • It is already installed but doesn't work for some reason and I dont know why...

            – Ja Bush
            Mar 8 at 13:36











          • @JaBush, check where are located classes of JavaFX and add the dir in CLASS_PATH vairable

            – Romeo Ninov
            Mar 8 at 13:47











          • How do I check that? @Romeo Ninov

            – Ja Bush
            Mar 8 at 13:57






          • 1





            I didn't notice you updated it, I'll try it asap and reply-back then or just mark the answer as solved, depending on the outcome

            – Ja Bush
            Mar 8 at 14:07

















          • sudo apt policy openjfx openjfx: Installed: 11.0.2+1-1 Candidate: 11.0.2+1-1 Version table: *** 11.0.2+1-1 500 500 http.kali.org/kali kali-rolling/main amd64 Packages 100 /var/lib/dpkg/status

            – Ja Bush
            Mar 8 at 13:36











          • It is already installed but doesn't work for some reason and I dont know why...

            – Ja Bush
            Mar 8 at 13:36











          • @JaBush, check where are located classes of JavaFX and add the dir in CLASS_PATH vairable

            – Romeo Ninov
            Mar 8 at 13:47











          • How do I check that? @Romeo Ninov

            – Ja Bush
            Mar 8 at 13:57






          • 1





            I didn't notice you updated it, I'll try it asap and reply-back then or just mark the answer as solved, depending on the outcome

            – Ja Bush
            Mar 8 at 14:07
















          sudo apt policy openjfx openjfx: Installed: 11.0.2+1-1 Candidate: 11.0.2+1-1 Version table: *** 11.0.2+1-1 500 500 http.kali.org/kali kali-rolling/main amd64 Packages 100 /var/lib/dpkg/status

          – Ja Bush
          Mar 8 at 13:36





          sudo apt policy openjfx openjfx: Installed: 11.0.2+1-1 Candidate: 11.0.2+1-1 Version table: *** 11.0.2+1-1 500 500 http.kali.org/kali kali-rolling/main amd64 Packages 100 /var/lib/dpkg/status

          – Ja Bush
          Mar 8 at 13:36













          It is already installed but doesn't work for some reason and I dont know why...

          – Ja Bush
          Mar 8 at 13:36





          It is already installed but doesn't work for some reason and I dont know why...

          – Ja Bush
          Mar 8 at 13:36













          @JaBush, check where are located classes of JavaFX and add the dir in CLASS_PATH vairable

          – Romeo Ninov
          Mar 8 at 13:47





          @JaBush, check where are located classes of JavaFX and add the dir in CLASS_PATH vairable

          – Romeo Ninov
          Mar 8 at 13:47













          How do I check that? @Romeo Ninov

          – Ja Bush
          Mar 8 at 13:57





          How do I check that? @Romeo Ninov

          – Ja Bush
          Mar 8 at 13:57




          1




          1





          I didn't notice you updated it, I'll try it asap and reply-back then or just mark the answer as solved, depending on the outcome

          – Ja Bush
          Mar 8 at 14:07





          I didn't notice you updated it, I'll try it asap and reply-back then or just mark the answer as solved, depending on the outcome

          – Ja Bush
          Mar 8 at 14:07

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f505130%2fstart-jar-in-linux-javafx-application-application%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown






          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Displaying single band from multi-band raster using QGIS

          How many registers does an x86_64 CPU actually have?