Monday, 31 December 2012

Centos 6/RHEL install IntelliJIDEA Java IDE


IntelliJIDEA community edition is an extremely useful free IDE for Java, Scala, Groovy,PHP, Python, Ruby, Spring MVC, Webflow, Play, Grails, Web Services, JSF, Struts, Flex and others with version control support Git, CVS, Mercurial and Subversion. 

It also has support for HTML5, CSS3, SASS, LESS, Javascript, Coffeescript, Actionscript, and others & build tools for Maven, Ant, Gradle and Gant with database functionality for SQL, PostgreSQL, MySQL, Oracle and SqlServer.

There is much more to this popular IDE though, so it is worth perusing the documentation on the web site. It has Android and Lint support and as in the snippet below, drug and drop functionality, although what drug it refers to is unclear.



A huge array of features make IntelliJIDEA an extremely useful free IDE and it's ease of installation and use means it is well suited to a minimal Centos 6 Desktop.

Obviously, first make sure you have the Sun Java JDK installed, follow the link here if not, and when that's done, continue.

The community edition is simple to install and use on Centos 6/RHEL, simply download the tarball from IntelliJIDEA  
into your home directory.

$ su                                             to root 

Move to the directory where you want to install it.

# cd /usr/local                             and untar it

# tar xzf /home/<user_name>/ideaIC-12.0.1.tar.gz

This gives you an idea directory in /usr/local

# exit                         back to unprivileged user

Now with it in place you just need a symlink to /usr/bin

$sudo ln -s /usr/local/idea-IC-123.94/bin/idea.sh /usr/bin/idea.sh

(Change the path if you put it elsewhere)

With the symlink made you can now run it with 

$ idea.sh



At first run (building a Java app), you will need to set up the JDK path, and a dialogue box will appear for you to do this. Just click the add button if your JDK doesn't already show up and add it on, whereby the box will disappear.
Typically, '/usr/java/jdk1.7.0_07' will suffice and others like Android SDK can be added also, see the images below.

Testing a sample class

There are plenty of features to keep you busy for a while and I'd recommend reading through the website docs thoroughly, there are also quite a few video tutorials available from Jetbrains TV.

Fluxbox users see Fluxbox key bindings for shortcut info.

Android SDK

Below are screenshots of the first stages of creating an Android application, for which you will need to set the location of your Android SDK as shown.


Click File > New project, select Android application

Click the New tab and browse to your SDK location

Click OK if all is correct

Your SDK appears in the box so you can now continue


















1 comment: