I am writing a program and it requires me to place a file on the desktop. I know in cmd prompt you can use %USERPROFILE% to do it.
Is there java equivalent?
System.getProperty("user.home") will give you the users home directory.
also would you be able to tell me how to determine what operating system they are using?
Take a look at the list of properties that are always available through System.getProperties(). OS is one of them.
You can also dump a list of all of them to sysout easily with the following code
Awesome thanks Ezzaral you rock!!