יום שני, 13 במאי 2013

Getting the current working path using Nio

In order to get the current working path in java we the following code can be used

import java.nio.file.Path;
import java.nio.file.Paths;

.

.

.

Path currentRelativePath = Paths.get("");

String theCurrentRelPath = currentRelativePath.toAbsolutePath().toString();

System.out.println("Current relative path is: " + theCurrentRelPath );


אין תגובות:

הוסף רשומת תגובה