0

I'm using java 7 to compile my class files using maven /usr/lib/jvm/java-1.7.0-openjdk-amd64/bin/java, but still i'm getting below errors. What might i be doing wrong ?

    Compilation failure:
    error: generics are not supported in -source 1.3
    error: annotations are not supported in -source 1.3

2 Answers 2

1

IntelliJ preference > Java > Compiler > Set language level to 1.7

Project > properties > Project language level > Set language level to 1.7

Sign up to request clarification or add additional context in comments.

2 Comments

There is no preference in menu bar of my IDE :( @jigar
I don't know what is the menu in windows, search something for tools > preference intuitively
0

You have change your pom file:

<project>
  [...]
  <build>
    [...]
    <plugins>
      <plugin>
        <groupId>org.apache.maven.plugins</groupId>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.2</version>
        <configuration>
          <source>1.7</source>
          <target>1.7</target>
        </configuration>
      </plugin>
    </plugins>
    [...]
  </build>
  [...]
</project>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.