Path for image file in Eclipse src folder, on a Mac
问题 I'm trying to load an image file. File imageCheck = new File("Users/me/Documents/workspace/ChineseChess/src/RCar.gif"); if (imageCheck.exists()) System.out.println("Image file found!"); else System.out.println("Image file not found! :("); button.setIcon(new ImageIcon("Users/me/Documents/workspace/ChineseChess/src/RCar.gif")); Should I put RCar.gif in the src or bin folder of an eclipse project? How would I refer to it without the explicit path? (I'm using a mac. I believe it should be