05
Aug
09

java chdir



If you need to use a chdir call in Java, here’s how chdir could be implemented :


public void chdir(String directory) {
  System.setProperty("user.dir",directory);
}

UPDATE:it seems chdir doesn’t work in Java. This tells you why.

Advertisements

1 Response to “java chdir”


  1. 1 user
    February 22, 2011 at 09:48

    this only changes the system property and does not change the directory.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Blog Stats

  • 228,094 hits

%d bloggers like this: