Tips & Tricks

Running Mustang

These days I am running a beta of IntelliJ IDEA on a preview release of JDK 1.6.0 (also known as Mustang). Because I use both in my daily work and play, I like to see how the new versions are going to be while I can still have some influence on their implementation. Here is how I do it.
Normally IntelliJ IDEA does not run on a non-supported JDK, so It is necessary to disable the JDK version checking it performs. This is done by editing the file that can be found in the bin directory inside IDEA’s installation directory. Add the following line:
Furthermore, the environment variable IDEA_JDK or JDK_HOME should be set to point to the location where JDK 1.6.0 is installed. This is the JDK IntelliJ IDEA will use to run itself on. If IDEA_JDK is defined, the value of that variable will be used, otherwise IntelliJ IDEA tries to use JDK_HOME. IntelliJ IDEA can now be started with the idea.bat file on Windows or on Unix and will be running on Mustang. On the Mac the procedure is slightly different.
Let me tell you first about the bad sides to running IntelliJ IDEA on Mustang, before I get to the good parts. Disadvantage number one, it is unsupported. Any bugs you find in IntelliJ IDEA running on Mustang will most likely not be fixed. At least not before JDK 1.6.0 is released, probably in October 2006. Disadvantage number two, Mustang still has bugs. For example until Mustang build 94, which I am currently using, closing all file editor tabs needed to be avoided at all costs. An exception was thrown and it was not possible anymore to open new files until IntelliJ IDEA was restarted. Currently the most serious bug I know about is slow scrolling in the IntelliJ IDEA editor and diff windows.
And now some advantages. Mustang contains a fix for the infamous “grey rect”. On Windows and Linux a Java frame is no longer cleared with a grey background every time it is obscured and revealed, but it is redrawn from a back buffer containing the frame’s previous contents. The fix has the psychological effect of making IDEA appear more responsive and it looks much better too. Mac users don’t need this fix, as any Java application already looks much better there than on the other platforms.
IntelliJ IDEA with visible gray rect problems
Another Mustang feature IntelliJ IDEA can make use of is the splash screen functionality. Mustang’s Java application launcher has a new command line option which tells it to show a splash screen image while it is starting up. This is especially nice when starting IDEA with the bat file, because the splash screen appears almost instantaneously, while using an older JDK the splash screen takes several seconds to show up.
IntelliJ IDEA logo
To use Mustang’s splash screen with IntelliJ IDEA, use a zip application to open the icons.jar file. This file can be found in the lib directory in the IntelliJ IDEA’s installation directory. Extract from this archive the file idea_logo.png and place it in the IntelliJ IDEA’s bin directory. This is the image that will be used as the splash screen. Now edit the file idea.vmoptions and add the following line:
And that is it. Start IntelliJ IDEA with idea.bat and the splash will appear immediately. After several seconds it will be replaced with the IntelliJ IDEA’s normal splash screen, which also shows you your license information.

Technorati tags:Mustang, IntelliJ, IDE, Java
image description