Image

Imagezewrestler wrote in Imagejava_dev

Who Am I and file path

I have to an an assignment for my Operating Systems class. part of the assignment i need to display the user name of the person. for windows, it would be the account they are logged in as, and linux, it would be the username.
<# puser> ---> where puser is the username that i have to display.

what class in java will allow me to display the user name?

also, i am working with file navigation. people have told me that i should use java.io.file for file navigation, can i set it for default path for it in a computer hiearchy that i havn't seen before? (ie: my teachers computer) is there a class better then io.file or is there a good tutorial that will explain what i need to do/keep in mind when i program this.

Thanks in advance.