Revision as of 06:47, 4 December 2010 by Han84 (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
public static String fileCurrentDirectory() {
	return System.getProperty("user.dir");
}
 
public static String fileCurrentDirectory2() {
	java.io.File f = new java.io.File(".");
	String path = null;
	try {
		path = f.getCanonicalPath();
	} catch (java.io.IOException ex) {
		Ts.printErr(ex);
	}
	return path;
}
 
public static void printErr(java.lang.Exception ex) {
	printErr(ex.getMessage());
}


Back to JavaHowTo

Alumni Liaison

BSEE 2004, current Ph.D. student researching signal and image processing.

Landis Huffman