Home > Blogs > A Java Programmer's Journey to the Land of Ubuntu

A Java Programmer's Journey to the Land of Ubuntu

Steven Haines shares his perspective on transitioning from Windows XP to Ubuntu Linux, both from a general perspective as well as from the perspective of developing and running Java applications.

Over the past month I have been migrating my laptop from Windows XP to Ubuntu and with my memory debacle a couple weeks ago (one of my sticks of RAM died when I put my laptop into standby mode in Windows - I know I can't blame Windows, but...), I am more convinced than ever that I'm want to make the transition. My journey into Linux on my laptop started a couple years ago when I played with Suse, but it seemed that installing and configuring applications on Suse was always troublesome - nothing seemed to work the first time, requiring me to Google <AppName> Suse to troubleshoot. And in the end I resolved about 60% of my problems, which left a bitter taste in my mouth. (And for the Suse readers out there, I'll confess right up front that I'm not a Unix guy (I do have a CS degree) so the problems were mine and not Suse's, but it was tough nonetheless.)

So enter Ubuntu. I read all of the reviews about how easy Ubuntu is to use, so I thought I'd take it for a spin. As far as applications go, Ubuntu is incredible: for 90% of the applications that you want to install, choose "Add/Remove..." from the "Applications" menu and Ubuntu downloads the application (and its dependencies) and installs and configures it for you. For the remaining 10%, you have two options: (1) use the "sudo apt-get install <packagename>" command if you know the package name or (2) download and install it yourself. The challenge with #1 is that you need to know the package name. With a little searching I found that the "/etc/apt/sources.list" file contains a set of URLs that Ubuntu uses to find application packages and by manually digging through some of these sources I found some helpful information, namely files named "Contents-i386" that I can grep to find packages if I know part of their names. If anyone has a better suggestion for finding applications and libraries than this tedious method, please respond and let me know. The challenge with #2 is that you need to launch the install yourself and know where to install your applications (which is not much of a challenge at all - if you're unsure then just install the application in your home directory.)

Two myths that I would like to dispel about Ubuntu, and Linux in general, are:
1. Configuring your computer is NOT as easy as Windows
2. Linux does crash

If your hardware works out-of-the-box then it is just as easy as Windows, but if not, you're going to have to do some work, which may require some Google abilities :) For me, I have a 1440x900 Widescreen display on my laptop and a wireless network card that did not work. Through some research and xorg.conf modifications I was able to get my display working, but even with and without ndiswrapper I still cannot get my wireless network card working. So does this mean that Windows is better than Linux? In short, no, it means that Windows is more popular so vendors write drivers for Windows and your Linux support may vary. Although if you're willing to put in the sweat time, you can get most things working.

In the past week I have had more crashes (freezes) using Ubuntu than I had in the past year with Windows. Again after a series of Google searches I think I have isolated it down to my video driver. And by following a tutorial to install Beryl (a really cool user interface enhancement that I will be installing this week) I found detailed instructions on configuring my Nvidia drivers properly. So I'm three days without a crash (fingers crossed).

Another aspect of Ubuntu that has made my life easier is configuring my corporate VPN. My only reasons for needing Windows were (1) VPN access to my corporate network and (2) Microsoft Outlook. Configuring access to my VPN took a night and forced me to learn how subnet masks work, but in the end it is far better than my Windows configuration because I learned how to route only my corporate requests through the VPN as opposed to all requests (which is the default configuration on Windows.) Finally, I downloaded Crossover Office from CodeWeavers through which I installed Outlook and Office (in case I need Microsoft Word for my work projects.) Thus eliminated ALL of my need for Windows :)

From a Java perspective, I have version 6 of the JDK installed as well as IntelliJ IDEA. Java development is just as fast and I feel that my startup times are faster and performance is better. For example, my Java-based MP3 player usually uses about 30-40MB of memory on Windows, but only 20MB on Linux, and startup time is about half. I'm still facing the learning curve of writing shell scripts to launch my Java applications (because I've been writing DOS batch scripts for more than a decade) and some abnormalities, such as dragging and dropping files from the Linux file system on your Java application does not provide the same information as Windows.

In short, I'm happy with my move to Ubuntu although I've faced struggles that might dissuade the casual Windows user. It's not a trip for the weary, but if you're willing to put in the time, running Linux, and more specifically Ubuntu, is very worthwhile!

Does anyone have any advice to share? Any thoughts on comparing/contrasting Java development on Windows versus Linux?

Cheers,
Steve

Become an InformIT Member

Take advantage of special member promotions, everyday discounts, quick access to saved content, and more! Join Today.