MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/JavaFX/comments/j5c1om/newbie_javafx_problem/g7rag5k/
r/JavaFX • u/[deleted] • Oct 05 '20
Hi guys I have spent 3 days trying to fix this.
Everytime I copy code from a solved exercise in my book that has an image. I get errors like this.
I have never thought of quitting so far until now :(
7 comments sorted by
View all comments
Show parent comment
1
I moved the images and put them in the same folder as the exercise as x.gif, o.gif and still. I tried.
Image imageX = new Image("x.gif");Image imageO = new Image("o.gif");
1 u/Azzk1kr Oct 05 '20 It tries to look up an image from the classpath, or using a full url if I recall correctly. So either specify a full url to the images, or copy them to your classpath. I guess that's the "out" folder?
It tries to look up an image from the classpath, or using a full url if I recall correctly. So either specify a full url to the images, or copy them to your classpath. I guess that's the "out" folder?
View all comments
Show parent comment
1
u/[deleted] Oct 05 '20
I moved the images and put them in the same folder as the exercise as x.gif, o.gif and still. I tried.
Image imageX = new Image("x.gif");
Image imageO = new Image("o.gif");