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

Ph.D. on Applied Mathematics in Aug 2007. Involved on applications of image super-resolution to electron microscopy

Francisco Blanco-Silva