Friday 20 June 2014

Set JDK 1.6 in IntelliJ IDE

1.
Install JDK1.6 (/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/)
Right Click "selected Project" -> Open Module Settings -> Project -> Project SDK->JDK1.6

In pom.xml, add maven-compiler-plugin
<artifactId>yourproject</artifactId>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<version>0.0.1-SNAPSHOT</version>


2. Generate .jar by using Maven from IntelliJ

Maven Projects->package->Right click "Run Maven Build"
Find the jar file from "~/IdeaProjects/projectname/target/"

No comments:

Post a Comment