Java examples for File Path IO:Path
Get Absolute path of the file
import java.io.*; public class Main { public static void main(String[] args) { // www . j ava2 s. c o m String filePath = File.separator + "JavaExamples" + File.separator + "IO"; File file = new File(filePath); System.out.println("Abstract file path is :" + file.getPath()); System.out.println("Absolute file path is : " + file.getAbsolutePath()); } }