title: Cannot find package java.nio.file
body: <p>My java compiler cannot find the <code>java.nio.file</code> package. Consider:</p>
  
  <pre><code>import java.nio.file.*;
  public class Test {
      public static void main(String[] args) { 
          Path currentRelativePath = Paths.get("");
      }
  }
  </code></pre>
  
  <p>compiling with </p>
  
  <pre><code>bash$ javac Test.java
  </code></pre>
  
  <p>gives</p>
  
  <pre><code>Test.java:1: package java.nio.file does not exist
  import java.nio.file.*;
                  ^
  Test.java:5: cannot find symbol
  symbol  : class Path
  location: class Test
      Path currentRelativePath = Paths.get("");
      ^
  Test.java:5: cannot find symbol
  symbol  : variable Paths
  location: class Test
      Path currentRelativePath = Paths.get("");
                                 ^
  3 errors
  </code></pre>
  
  <p>I am using Ubuntu 12.04, and I think I have JDK 7 installed (see: <a href="https://stackoverflow.com/questions/16577797/package-java-nio-file-does-not-exist">package java.nio.file does not exist</a> )</p>
  
  <pre><code>bash$ java -version
  java version "1.7.0_25"
  OpenJDK Runtime Environment (IcedTea 2.3.10) (7u25-2.3.10-1ubuntu0.12.04.2)
  OpenJDK 64-Bit Server VM (build 23.7-b01, mixed mode)
  </code></pre>