Friday, 3 August 2012

Centos 6/RHEL install BlueJ IDE jar

BlueJ is a popular Java IDE, intended for students but it makes a handy editor for experienced pros with its very distinct highlighting, class and method separation + auto indent features. It has Junit testing built in although this has to be enabled in the menu. You can quickly create executable jar files from a project which you have built in BlueJ or one which you have imported from elsewhere, such as Eclipse.

Add to that compile-on-the-fly, Ctrl+space code hints (as in Eclipse) and support for Java ME (subject to installing the Sun
Wireless Toolkit) and you have a pretty functional little IDE with a lightweight footprint which is useful if you don't need all the facilities of Eclipse and Netbeans or similar.

Installing  the BlueJ Java IDE on Centos 6/RHEL is a simple procedure, just go to and make sure you get the 3.08.jar version or above. Debian systems have their own deb packages, but there are no suitable rpms for Centos/RHEL unless you convert with Alien, which is possible but entails some editing of the BlueJ launch script. So the easiest way seems to be to use the supplied jar file on the site. You must have Sun Java JDK to use the BlueJ jar version.

Download bluej3.08jar to your home directory and issue the command

$ java -jar bluej-308.jar

In the install directory field insert a dot to make it hidden as shown above, then browse to the correct jdk installation on your system. Click install then done.

You will not yet be able to run it with 'bluej' because you have changed the path slightly.

So we create a symlink in /usr/bin with the new path.

$ sudo ln -s /home/<user_name>/.bluej/bluej /usr/bin/bluej

Now you can run it with

$ bluej

You can arrange your other shortcuts according to your system layout.

In Fluxbox, just put an entry in the /home/<user_name>/.fluxbox/keys file

Mod1 b : ExecCommand bluej

So you can hit Alt+ b to run it

See Fluxbox key bindings for more. 

Or cd to Desktop folder and put a symlink there

$ ln -s /usr/bin/bluej

1 comment: