0

I'm trying to open my jar file which I exported from IntelliJ-IDEA but the jar file unfortunately doesn't open and no error happens, although the app is running on IntelliJ, I dont know if the problem is being from the jar itself or from the code ! here is the main screen code:

package controllers;

import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.fxml.Initializable;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;

import java.io.IOException;
import java.net.URL;
import java.util.ResourceBundle;

public class Main extends Application {



@Override
public void start(Stage primaryStage) {

    Parent root = null;

    try {
        root = FXMLLoader.load(getClass().getResource("../views/main_screen.fxml"));

    } catch (IOException e) {
        e.printStackTrace();
    }

    Scene scene = new Scene(root);
    primaryStage.setTitle("Salesman Manager");
    primaryStage.setScene(scene);
    primaryStage.setResizable(false);
    primaryStage.show();

}

public static void main(String[] args) {
    launch(args);
}


}
Sundos Altamimi
  • 29
  • 1
  • 1
  • 12
  • Why do you want to open the jar file, jar file is like a zip file ? if you want to open the jar file, you have to use some zip program to see whether the jar file contains your classes or not. – Sambit May 12 '19 at 08:30
  • @Sambit I'm pretty sure "open" in this context is supposed to mean "run the runnable jar". – fabian May 12 '19 at 09:45
  • 1
    Try to run the JAR from the command line to see if you get any output. – Slaw May 12 '19 at 09:52

0 Answers0