How to build a java project goal as 1.5 on 1.6 JDK with Intellij IDEA?

I am working on a project to be deployed in runtime 1.5. So does anyone know how to build a project goal as 1.5 on 1.6 JDK with Intellij IDEA, and My development is Mac OSX 10.8 and JDK 1.6

+8
java-ee intellij-idea
source share
3 answers

The bytecode can be managed for each project or module:

bytecode version

+13
source share

I had the same problem and fixed it changing the maven compiler plugin configuration

<plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.0</version> <configuration> <source>1.6</source> <target>1.6</target> </configuration> </plugin> 
+3
source share

You can also change this based on a separate project, rather than setting the default bytecode version in global settings.

In 2016:
File → Project Structure
In the section "Project Settings" → Modules
Select the module to change in the left pane.
In the Sources section, change "Language Level:" to any level supported by your JDK

Select JDK bytecode version in 2016.2

0
source share

All Articles