JAVA 11
Java path Guest on 19th November 2022 09:31:17 PM
  1. //displays the current working path of the java program
  2. public class currentdir {
  3.   public static void main(String[] args) {
  4.     System.out.println("Current parent directory of this program:\n" + System.getProperty("user.dir"));
  5.   }
  6. }

Paste is for source code and general debugging text.

Login or Register to edit, delete and keep track of your pastes and more.

Raw Paste

Login or Register to edit or fork this paste. It's free.