April 16, 2008

Setting up Ubuntu 8.04 for Java Development

At work, I've been getting frustrated with how poorly Windows XP performs for Java development.

At my last work I got on a pilot program to us a Mac, and the compile time for the entire project went from 20 minutes for a clean build to 2 minutes, yes that's correct, 10 times faster. Why? I think there are a handful of reasons, first I have noticed that compiling Java programs is fairly IO intensive. NTFS seems to be a rather inefficient file system (the native file system for XP). Also if you use XP you need to use virus protection to keep from getting infected by every 10th bit on the internet (OK, that is a bit of an exaggeration), and most paranoid IT departments want real time scanning. This sounds good at a theoretical level, but funneling all your OS's disk access through a single software process is a pretty solid recipe for poor performance (the above timing improvement was with virus scanning disabled). During build times, the processor was not at 100% or even 50% most the time, it was the hard disk that was over-taxed.

So at my new job, I wanted to get as close to the Mac as I could without having to convince them to spend money. The solution: Linux. There are lots of choices for a distribution, the top contenders in my list are Fedora (closest to what our production systems run), OpenSuse (pretty user friendly and supported mainstream) and Ubuntu. I prefer Ubuntu because it just works without a lot of fuss and the forums are pretty active with answers to most of what I want to accomplish.

Here is my setup:
  • 64-bit OS so I can use full 4GB memory and video drivers work well (running ati 32bit drivers on 32bit OS on 64bit hardware doesn't work too well)
  • Oracle 10gR2, this can be a pain to setup and I almost gave up but I found this blog and this forum that gets it working. (Note that you also need to get
    sudo apt-get install gcc-multilib g++-multilib)
  • MySQL (yes I need two databases)
    sudo apt-get install mysql-server

  • Cisco VPN client (network-manager-vpnc)

  • ant, maven

  • kdiff3 for code read comparisons

  • svn-workbench, subversion for source control

  • Oracle SQL Tools

    • DBVisualizer (commercial)

    • SqlDeveloper (free from Oracle)

  • archiva to proxy maven repos for performance

  • ArgoUML for design

  • Java IDE: Eclipse, Netbeans or IntelliJ. I use IntelliJ