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

Correspondence Chess Grandmaster and Purdue Alumni

Prof. Dan Fleetwood