When I build and run my program in Netbeans, it works without a problem. But with same pom.xml file when I try \"mvn compile\" I get this error:
[ERROR] Fail
It seems your maven java home point to a jre not jdk
Java home: /usr/lib/jvm/java-7-openjdk-amd64/jre
You have to change it to a jdk.
Try java -version
and see what is there
use /usr/sbin/alternatives --config java
to change your java version.
It seems your maven compiler plugin version is 1.3.
Have a look at this link to force the compiler to run with JDK 1.7, http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-using-different-jdk.html