469,306 Members | 1,797 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,306 developers. It's quick & easy.

How to get the windows program files path

karthickkuchanur
156 100+
Dear all,
Please tell me how to get the Windows Xp program file path using java
Nov 6 '08 #1
13 11577
sukatoa
539 512MB
Take a look at the methods under the File class.
Nov 6 '08 #2
karthickkuchanur
156 100+
Take a look at the methods under the File class.
File Class cant have the option such getting the PAth of windows directory like
C:/programfiles
Nov 6 '08 #3
r035198x
13,262 8TB
Read the API specs for the System.getProperties method to find out what's available.
Nov 6 '08 #4
karthickkuchanur
156 100+
Read the API specs for the System.getProperties method to find out what's available.
No such method
Iam getting all the details like
os name
java path using System etc
but i cant find the windows OS installation path
Nov 6 '08 #5
JosAH
11,448 Expert 8TB
Have a look at one of the System.getEnv() methods.

kind regards,

Jos
Nov 6 '08 #6
karthickkuchanur
156 100+
Have a look at one of the System.getEnv() methods.

kind regards,

Jos
System.getenv();
its a depricated method
Nov 6 '08 #7
r035198x
13,262 8TB
System.getenv();
its a depricated method
Since when? Which specs are you looking at?
Nov 6 '08 #8
JosAH
11,448 Expert 8TB
System.getenv();
its a depricated method
They only brought it in after great demand in version 1.5. You need other glasses.

Jos
Nov 6 '08 #9
karthickkuchanur
156 100+
They only brought it in after great demand in version 1.5. You need other glasses.

Jos

Iam using version 1.5
Nov 6 '08 #10
JosAH
11,448 Expert 8TB
Iam using version 1.5
Hurray, so there's your solution.

Jos
Nov 6 '08 #11
karthickkuchanur
156 100+
Hurray, so there's your solution.

Jos
We find the solution for that !thanks a lot keep in touch to give the solution for my queries
Nov 6 '08 #12
itsraghz
127 100+
How about having a look at "getAbsolutePath()" and "getCanonicalPath()" methods of File class?

The Java Doc of the methods are below.

http://java.sun.com/j2se/1.5.0/docs/...AbsolutePath()
http://java.sun.com/j2se/1.5.0/docs/...anonicalPath()
Nov 6 '08 #13
karthickkuchanur
156 100+
How about having a look at "getAbsolutePath()" and "getCanonicalPath()" methods of File class?

The Java Doc of the methods are below.

http://java.sun.com/j2se/1.5.0/docs/...AbsolutePath()
http://java.sun.com/j2se/1.5.0/docs/...anonicalPath()
iam talking about the where windows OS is installes
like c:/programFiles/Windows
Nov 7 '08 #14

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

reply views Thread by Wil Koenen | last post: by
13 posts views Thread by Russell E. Owen | last post: by
6 posts views Thread by Laszlo Zsolt Nagy | last post: by
2 posts views Thread by Sergio Correia | last post: by
reply views Thread by suresh191 | last post: by
reply views Thread by harlem98 | last post: by
reply views Thread by harlem98 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.