01: /*
02: * PWD.java --
03: *
04: * jacl/tests/exec/PWD.java
05: *
06: * Copyright (c) 1998 by Moses DeJong
07: *
08: * See the file "license.terms" for information on usage and redistribution
09: * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
10: *
11: * RCS: @(#) $Id: PWD.java,v 1.1 1999/05/10 04:09:04 dejong Exp $
12: *
13: */
14:
15: package tests.exec;
16:
17: public class PWD {
18: public static void main(String[] argv) {
19: String dirName = System.getProperty("user.dir");
20:
21: String os = System.getProperty("os.name");
22:
23: if (os.toLowerCase().startsWith("win")) {
24: dirName = dirName.replace('\\', '/');
25: }
26:
27: System.out.println(dirName);
28: System.exit(0);
29: }
30: }
|