0

Hey,
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?

Thanks PO

2
Contributors
4
Replies
5
Views
8 Years
Discussion Span
Last Post by PhiberOptik
0

Awesome thanks,

also would you be able to tell me how to determine what operating system they are using?

Thanks PO

0

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

System.getProperties().list(System.out);
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.