My class IntroState.java has the following path:
Project/src/GameState/IntroState.java
My image is located at:
Project/Resources/Images/logo.png
The folder Resources is a Source Folder. I use Eclipse oxygen.
i try to load it with:
new BufferedImage image = ImageIO.read(getClass().getResource("/Images/logo.png");
I get a NullPointerException when i run it.
This Code worked fine in an older project, but my Laptop died and i had to reinstall Eclipse and redo my Code, since then it stopped working.
Anyone see the problem?
i tried lots of different paths, i have the feeling that some of my Eclipse settings are wrong maybe.