As seen in the screenshot the module/project are set to jdk 1.7
Project / sdk set to 7:
Module set to jdk 7:
However from javap we are seeing java6 (50) ??
a) Confirm the class were just now compiled (7/22/15 @18:14) :
ls -l ./target/classes/org/yardstickframework/spark/DataGenerator.class
-rw-r--r-- 1 steve staff 3829 Jul 22 18:14 ./target/classes/org/yardstickframework/spark/DataGenerator.class
b) Which version of java?
javap -verbose ./target/classes/org/yardstickframework/spark/DataGenerator.class | grep ver
minor version: 0
major version: 50
Note: The pom.xml sets language level to jdk7
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
Update Per a suggestion I ran the compilation from command line :
mvn clean compile
This results also in jdk6 /major version=50. Now why would that be? I am examining the POM to see if other weirdness present.
Another update Per Roman's request: here is maven output
$mvn -v
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 08:22:22-0700)
Maven home: /usr/local/Cellar/maven/3.1.1/libexec
Java version: 1.7.0_25, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.10", arch: "x86_64", family: "mac"
Yet another update ElliottFrisch suggested some additions to the maven compiler plugin. Here is the updated section:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<fork>true</fork>
<verbose>true</verbose>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>