I want to load an image to a javafx programme using only the path "logo.jpg". However, it does not work. The fullpath can also work clearly. My instructor can work the program using the path "logo.jpg" on his/her computer. Both of us use eclipse. What is the reason of this issue?
My project like that;
-ProgDemo
-src
-application
-ImageDemo.java
-application.css
-logo.jpg
My Codes;
Image image = new Image("C:\\Users\\xxx\\eclipse-workspace\\ProgDemo\\src\\application\\logo.jpg");
ImageView imgView = new ImageView(image);
BorderPane pane = new BorderPane();
pane.setCenter(imgView);
Scene scene = new Scene(pane,1000,1000);
primaryStage.setTitle("Finally we win.");
primaryStage.setScene(scene);
primaryStage.show();