I'm a beginner person on Java and i have a little problem about making .jar files with Intellij IDEA. I'm trying to make a simple library management system for my daily use.
The first image is my project on IDE. When i click Run button on IDE, it's working without a problem.
The second image is my same project on IDE. I only changed my packages. I moved FXML files on mainJavaFiles package and deleted xmlFiles package. When i click Run button on IDE, it's working without a problem.
first image : https://i.stack.imgur.com/ZGvJZ.png
second image : https://i.stack.imgur.com/mZzMB.png
The problem is starting when i try to run .jar file. I can make .jar files with first and second pictures project structure, there is no problem. My .jar file is running without a problem with second pictures project structure. But my .jar file isn't running with first pictures project structure.
When i seperate my java and fxml files by using different packages, my jar file isn't running. What should i change to run my jar file with first pictures project structure. How can i solve this problem?
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(getClass().getResource("anaEkran.fxml"));
primaryStage.getIcons().add(new Image(getClass().getResourceAsStream("book-open-icon.png")));
primaryStage.setTitle("Kitaplık Yönetim Sistemi");
primaryStage.setScene(new Scene(root));
primaryStage.show();
}