Read win.ini file?

C

Christophe Vanfleteren

Greg said:
But how can I get c:\Windows directory?

Read the java.io.File javadocs (a directory is also a file).

Beware that not every windows install has a c:\windows directory, it can also
be c:\winnt (NT 4, win 2000, ...), let alone a linux install.
 
R

Roald Ribe

Real Gagnon said:
try

System.out.println("SYSTEM DIR : " +
System.getProperty("user.home"));

They are only the same on old Windows versions.
Unless there is a specific java property for it,
the easiest way to find the windows directory is
to read the "windir=" setting from the environment.

Roald
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top