learning java.
- follow document:
- update maven compile configulation
error when run
mvn compile
:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] Source option 1.5 is no longer supported. Use 1.6 or later.
how to fix this:
add the following code to pom.xml
inside project
property:
<properties>
<maven.compiler.source>1.7</maven.compiler.source>
<maven.compiler.target>1.7</maven.compiler.target>
</properties>
- package
$ mvn package
and target
folder is genarated.
- run
$ java -jar /target/maven-test-0.1.0.jar
Hello world!