-1

I made a java application using javaFx on Eclipse IDE. I am using JavaSE-11 compiler and the javafx-sdk-11 version. It works when I run it from Eclipse, but now i'm trying to make a runnable .jar of the application.

When I double click on the .jar, nothing happens. I tried installing, uninstalling and reinstalling Java ... Here are the issues I'm having when I try to launch it with [java -jar filename.jar] command :

  • Extracting the required libraries into generated JAR
java : Error : JavaFX runtime components are missing,
 and are required to run this application
  • Packaging the required libraries into generated JAR
java : Graphics Device intialization failed for : d3d, sw
Error initializing QuantumRenderer : no suitable pipeline found

Don't hesitate to ask me more details, I'm not very good at this but I'm trying my best. Thanks

1 Answers1

0

I had same problem few days back. I just made another class that doesn't extend Application, and has its own main. Then just launched the application from that class like so:

public class Fakemain {


 public static void main(String[] args) {
     game.main(args);    //this is the class that extends Application
    }
 }   

Let me know if this worked for you.

Joku
  • 3
  • 2
  • I had already tried to make another main class (i called it "Launcher") but it still didn't work ... Finally I could make it work with IntelliJ by adding the dll files from the javafx bin folder to the output layout section in the artifact editing page. – Zenchaineur May 28 '21 at 15:23