I want to access my current working directory using java.
My code :
String current = new java.io.File( \".\" ).getCanonicalPath(); System.ou
I've found this solution in the comments which is better than others and more portable:
String cwd = new File("").getAbsolutePath();
Or even
String cwd = Paths.get("").toAbsolutePath();