Is there a way to check the operating system you are on in Java?
I am making a mario bros. clone for a java project and am doing it on two computers, one is windows, the other is Ubuntu. I need to specify the OS so I can read the images, which are in different directories than the classes. Unless I am mistaken, Ubuntu will use a '/' for a directory and windows uses '\\', and I need it to automatically specify so I dont have to change the code every time i switch platforms.
Bookmarks