I'm using Dropbox API V2 to download images from my Dropbox to my Java Program. I save them in "/src/main/Resources/Downloads/" and then want to get the image.jpg at the same time the program is running after downloaded.
1) The first time the program downloads the image and run this I get "Invalid URL or resource not found" error:
Button button1 = new Button();
Image thumbnail = new Image("/Downloads/image.jpg");
button1.setGraphic(new ImageView(thumbnail));
2) Second time when I have closed the program and the file is already saved in Resources it works.
What am I missing?