I want to access my current working directory using java.
My code :
String current = new java.io.File( \".\" ).getCanonicalPath(); System.ou
I'm on Linux and get same result for both of these approaches:
@Test public void aaa() { System.err.println(Paths.get("").toAbsolutePath().toString()); System.err.println(System.getProperty("user.dir")); }
Paths.get("") docs
System.getProperty("user.dir") docs