Cannot find package java.nio.file
Java NIO was introduced in Java 7. Compilers from earlier versions of the JDK will baulk at any code that contains these NIO classes. You need to upgrade to JDK 7.
It is entirely possible that you have java
1.7, but javac
1.6 or even 1.5
maybe you can use
sudo update-alternatives --config javac
to configure it. If you cannot choose 1.7, then you need to upgrade your JDK package.