Tutorials‎ > ‎

Java IntelliJ installation guide

Tested on: IntelliJ 14.1

Java Development Kit with Cryptography Extension (JCE) Unlimited Strength 


Download the latest Java SE Development Kit and the Java Cryptography Extension (JCE) Unlimited Strength here.
Install the JDK in "C:\Java\jdk_<version>". (When the installer wants to install the JRE, press the cancel button)
Next unzip the "local_policy.jar" and the "US_export_policy.jar" to the directory  "C:\Java\jdk_<version>\jre\lib\security". (overwrite existing jars)

Configure

Add JAVA_HOME to the environment variables with value "C:\Java\jdk_<version>".

Apache Ant


Download the latest Apache Ant version and unzip it in "C:\Java".

Configure

Add ANT_HOME to the environment variables with value "C:\Java\apache-ant_<version>".

Apache Maven


Download the latest Apache Maven version and unzip it in "C:\Java".

Configure

Add MAVEN_HOME to the environment variables with value "C:\Java\apache-maven_<version>".
Make the following additions to %MAVEN_HOME%\conf\settings.xml:
<settings> 
    <localRepository>${home_directory}\projects\localRepository</localRepository>
</settings>

Configure PATH environment variable


Add "%JAVA_HOME%\bin;%ANT_HOME%\bin;%MAVEN_HOME%\bin" at the beginning of the PATH environment variable. (without the " !)

IntelliJ


Tip: Cleanup old IntelliJ files on Microsoft Windows
Delete the directories "C:\Users\<username>\AppData\Roaming\JetBrains" and "C:\Users\<username>\.IntelliJIdea14".

Install

Update

In the menu, select "Help->Check for Update...".

Set Eclipse key shortcuts

In the menu, select "File->Settings->Keymap", for "Keymaps:" select "Eclipse".

Install Plugins

To install a plugin, in the menu, select "File->Settings->Plugins".
Click on "Browse repositories...", search by keyword and click the Install button to install the plugins you need.

NOTE: A lot of plugins are provided out of the box, so as the Code Coverage, JSON, Less, ResourceBundle Editor.

Findbugs Plugin

Name: FindBugs-IDEA
Keyword: findbugs
What to install: Everything

CheckStyle Plugin

Name: Checkstyle-IDEA
Keyword: findbugs
What to install: Everything

Configure

Switch encoding to UTF-8

In the menu, select "File->Settings". Search for "File Encodings", switch all encoding options to UTF-8 and click "Apply".

Switch file delimeter to UNIX style

IIn the menu, select "File->Settings->Editor->Code Style", set "Line separator(for new files)" to "Unix and OS X (\n)" and click "Apply".

Set line length

In the menu, select "File->Settings->Editor->Code Style", set "Right margin (columns)" to "140" and click "Apply".

Set tabs for indentation

In the menu, select "File->Settings->Editor->Code Style", enable "Use tab character" and click "Apply".

Use Maven

In the menu, select "File->Settings->Build, Execution, Deployment->Build tools" and navigate to "Maven".
For "Maven home directory" select "/opt/apache-maven-3.x.x".

Show Ant output

In the "Ant build" panel, click on "Properties" (or press alt+enter), disable "Make build in background" and click on "OK".