Why my Windows does not load resources from jar file?

Hello. I wrote a small program. In this program I can assign to buttons icons. Icons taken from the jar. Way prescribe way:
private static final String PATH_TO_IMAGE_RETURN = File.separator + "images" + File.separator + "cross.png";

Then use this:
Icon Icon = new ImageIcon(getClass().getResource(PATH_TO_IMAGE_RETURN));


In Linux everything works fine in Windows e no.
June 14th 19 at 18:21
1 answer
June 14th 19 at 18:23
Solution
The resource paths are always separated by the symbol / , regardless of operating system.

Find more questions by tags JavaWindows