TestGameTable.class.getResource("/unibo/lsb/res/dice.jpg");
- leading slash to denote the root of the classpath
- slashes instead of dots in the path
- you can call
getResource()
directly on the class.
TestGameTable.class.getResource("/unibo/lsb/res/dice.jpg");
getResource()
directly on the class.