| Author |
how to get windows root directory
|
manucng davangere
Greenhorn
Joined: Aug 10, 2009
Posts: 12
|
|
Hi All,
Can any one tell me .how to get windows root directory in java.
i need code pr api which returns root directory of windows such as C:\WINDOWS,or D:\WINDOWS.
i want to store one dll other than current directory so i want to store in windows root directory.i should not hard code the path as i am not sure C,D will be exists in other Computers.
please help me.i have tried System.GetProperties,but no use.please give me some ideas or clue.
please help me .
regards,
manu
|
regards,
manu
|
 |
Freddy Wong
Ranch Hand
Joined: Sep 11, 2006
Posts: 959
|
|
|
In Windows, there is a built-in environment variable, called windir. You can use System.getenv("windir") in java.
|
SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
|
 |
manucng davangere
Greenhorn
Joined: Aug 10, 2009
Posts: 12
|
|
|
Thank you very much.
|
 |
 |
|
|
subject: how to get windows root directory
|
|
|