I am trying to locate the path of the current running/debugged project programmatically in Java, I looked in Google and what I found was System.getProperty(\"user.id\"
File currDir = new File(".");
String path = currDir.getAbsolutePath();
System.out.println(path);
This will print . at the end. To remove, simply truncate the string by one char e.g.:
File currDir = new File(".");
String path = currDir.getAbsolutePath();
path = path.substring(0, path.length()-1);
System.out.println(path);