Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Java only
Search
Advanced Search
Forums
BYTES
Product Launch
Updates
Developer Toolkit
Member List
Calendar
Today's Posts
Home
Forum
Topic
Java
How to get the windows program files path
How to get the windows program files path
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
karthickkuchanur
New Member
Join Date:
Dec 2007
Posts:
156
#1
How to get the windows program files path
Nov 6 '08, 04:41 AM
Dear all,
Please tell me how to get the Windows Xp program file path using java
sukatoa
Contributor
Join Date:
Nov 2007
Posts:
539
#2
Nov 6 '08, 05:55 AM
Take a look at the methods under the
File
class.
Comment
Post
Cancel
karthickkuchanur
New Member
Join Date:
Dec 2007
Posts:
156
#3
Nov 6 '08, 06:00 AM
Originally posted by
sukatoa
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
Comment
Post
Cancel
r035198x
MVP
Join Date:
Sep 2006
Posts:
13225
#4
Nov 6 '08, 06:23 AM
Read the API specs for the System.getPrope rties method to find out what's available.
Comment
Post
Cancel
karthickkuchanur
New Member
Join Date:
Dec 2007
Posts:
156
#5
Nov 6 '08, 07:05 AM
Originally posted by
r035198x
Read the API specs for the System.getPrope rties 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
Comment
Post
Cancel
JosAH
Recognized Expert
MVP
Join Date:
Mar 2007
Posts:
11453
#6
Nov 6 '08, 07:38 AM
Have a look at one of the System.getEnv() methods.
kind regards,
Jos
Comment
Post
Cancel
karthickkuchanur
New Member
Join Date:
Dec 2007
Posts:
156
#7
Nov 6 '08, 08:03 AM
Originally posted by
JosAH
Have a look at one of the System.getEnv() methods.
kind regards,
Jos
System.getenv() ;
its a depricated method
Comment
Post
Cancel
r035198x
MVP
Join Date:
Sep 2006
Posts:
13225
#8
Nov 6 '08, 08:38 AM
Originally posted by
karthickkuchanu r
System.getenv() ;
its a depricated method
Since when? Which specs are you looking at?
Comment
Post
Cancel
JosAH
Recognized Expert
MVP
Join Date:
Mar 2007
Posts:
11453
#9
Nov 6 '08, 08:47 AM
Originally posted by
karthickkuchanu r
System.getenv() ;
its a depricated method
They only brought it in after great demand in version 1.5. You need other glasses.
Jos
Comment
Post
Cancel
karthickkuchanur
New Member
Join Date:
Dec 2007
Posts:
156
#10
Nov 6 '08, 10:10 AM
Originally posted by
JosAH
They only brought it in after great demand in version 1.5. You need other glasses.
Jos
Iam using version 1.5
Comment
Post
Cancel
JosAH
Recognized Expert
MVP
Join Date:
Mar 2007
Posts:
11453
#11
Nov 6 '08, 10:29 AM
Originally posted by
karthickkuchanu r
Iam using version 1.5
Hurray, so there's your solution.
Jos
Comment
Post
Cancel
karthickkuchanur
New Member
Join Date:
Dec 2007
Posts:
156
#12
Nov 6 '08, 10:57 AM
Originally posted by
JosAH
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
Comment
Post
Cancel
itsraghz
New Member
Join Date:
Mar 2007
Posts:
124
#13
Nov 6 '08, 11:10 AM
How about having a look at "getAbsolutePat h()" and "getCanonicalPa th()" 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()
Comment
Post
Cancel
karthickkuchanur
New Member
Join Date:
Dec 2007
Posts:
156
#14
Nov 7 '08, 04:03 AM
Originally posted by
itsraghz
How about having a look at "getAbsolutePat h()" and "getCanonicalPa th()" 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
Comment
Post
Cancel
Previous
template
Next
Working...
OK
OK
Cancel
👍
👎
☕
Comment