I am using eclipse juno for the java application and want to load an image on application and for that I am writing following code
URL imageURL = LoginWindow.class.getClassLoader().getResource("resources/img/pause.png");
which gives the following error
Resource not found: resources/img/pause.png Exception in thread "main" java.lang.IllegalArgumentException: creating TrayIcon with null Image at java.awt.TrayIcon.(Unknown Source)
but if I put the image in the folder where my java file is and remove all path and give only "pause.png" then it works properly.