Java Root Directory Get getRootDir()

Here you can find the source of getRootDir()

Description

get Root Dir

License

Open Source License

Declaration

public static String getRootDir() throws IOException 

Method Source Code

//package com.java2s;

import java.io.*;

public class Main {
    public static String getRootDir() throws IOException {
        //      We want to return the root directory of the program!
        //      return "/home/tam/eclipse-workspace-str/PDFAnalyser-1.1-os";
        File currentDir = new File(".");
        //      System.out.println(currentDir.getCanonicalPath());
        return currentDir.getCanonicalPath();
    }/*from w w  w.j av  a  2 s . c o  m*/
}

Related

  1. getRootDir()
  2. getRootDir()
  3. getRootDir()
  4. getRootDir()
  5. getRootDir()
  6. getRootDir()
  7. getRootDirectory()
  8. getRootDirectoryOf(String referenceFile, String rootMark)