Quantcast
Channel: Apache Timeline
Viewing all articles
Browse latest Browse all 5648

Errors that look like the compiler is using 1.5 jdk

$
0
0
I am building with jdk 1.7 but getting an compiler error that suggests mvn is
using the 1.5 jdk ( which is not installed).

error: multi-catch statement is not supported in -source 1.5

Here is my environment

Maven home: /opt/apache-maven-3.0.4
Java version: 1.7.0_25, vendor: Oracle Corporation
Java home: /usr/java/jdk1.7.0_25/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.18-274.el5", arch: "i386", family: "unix"

I have even tried specifically specifying the JDK version in the compile
plugin

<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.2</version>
<configuration>
<verbose>true</verbose>
<fork>true</fork>
<executable>${JAVA_HOME}/bin/javac</executable>
<compilerVersion>1.7</compilerVersion>
</configuration>
</plugin>

Viewing all articles
Browse latest Browse all 5648

Trending Articles