473,382 Members | 1,653 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 11905
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

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

Similar topics

0
by: Wil Koenen | last post by:
Hi, When importing (parts of) gtk, here's what I get: >>> import gobject Traceback (most recent call last): File "<pyshell#13>", line 1, in ? import gobject ImportError: DLL load failed:...
13
by: Russell E. Owen | last post by:
I'm trying to launch an application from Python 2.3 on Windows. The application is "ds9" (an image viewer), and is installed in C:\Program Files\ds9\ds9 On unix I just do: os.popen3("ds9") and...
2
by: Ken Lindner | last post by:
I have a need to become familiar with SQL Server 2000 for work. Needless to say I am new to SQL Server any version, but not IT in general. My employer has provided me with the SQL Server 2000...
6
by: Laszlo Zsolt Nagy | last post by:
Sorry, I realized that the import zlib was not executed from my (working) service. So here is the question: why can't I use zlib from a win32 service? Is there any way to make it working? ...
1
by: Charles | last post by:
I'm trying to write a windows application in C# (Using Microsoft Visual C# 2005 Express) that is nothing more than a simple UI with buttons on it. The buttons do various things like running...
3
by: Chris Paul | last post by:
I'm having trouble with PHP & PostgreSQL/OpenLDAP/Apache on Windows. I've set this up countless times on BSD (piece of cake) but I'm trying to do this on Windows now so that my developer can work...
2
by: Sergio Correia | last post by:
Hi, I'm trying to add a personal folder to the path used by python in searching for packages and modules. This folder, "C:\docs\utils" , has some packages not yet ready for "site-packages". ...
0
by: Kozy | last post by:
Hello everyone, i am having some problems with a very simple UDF function writen in C. I have compiled the c file into a DLL ( used Dev-C++ ) an copyed the dll into functions directory (...
6
by: josequinonesii | last post by:
I've searched, I've read, I've tested and re-read numerous post but to no avail yet... Quite simply, the settings I've applied to my httpd.conf, httpd-vhost.conf and my hosts files simply does not...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.