For quite some time I have been planning to make Linux my primary work environment. So I setup a Ubuntu – WinXP dual boot machine and have since been gradually trying to make Ubuntu my primary OS. The idea is that by the time people start moving to Windows Vista, I will be on Ubuntu.
Ubuntu is a user friendly flavor of Linux that enjoys great community support through its forums at UbuntuForums.org . Installing Ubuntu is straightforward if you are installing on a new machine. However for a dual boot Windows + Ubuntu installation, you would encounter some steps during installation that are very good at scaring you and making you wonder if you are losing all your Windows data.
Several popular software like Firefox, OpenOffice and Gimp work fine on Ubuntu. OpenOffice and Gimp actually perform better on Ubuntu than on Windows.
However the list of software that won’t install is also quite long.
- Yahoo Messenger 🙁
- Google Talk 🙁
- Google Earth 🙁
- Skype 😐 A basic version is available
- Sea Monkey 🙁
- Opera 😐 Installation through software channel doesn’t work. .bin file works
- WYSIWYG HTML Editors support 🙁
- No Internet Explorer 😐 All web development has to be tested on IE, irrespective of whether you like it or not.
- Sound and Video players 😐 Few options
- FTP client – GFTP which is the most popular is not that good. Filezilla 3 is supposed to work on Linux (currently in beta)
You can use Wine, which is a Windows implementation for Unix. Wine will simulate Windows and a Windows directory structure, tricking the Windows application installer into thinking that it was being installed on a Windows machine. But making applications work by simulating Windows on Linux is no fun, especially if the primary reason you are using Linux is to move away from Windows.
Apart from issues with availability of software, I had some trouble with file sharing between Ubuntu and Windows machines on the same network. Also you can read files from Windows partitions on your machine using Ubuntu, but the driver to write back to the Windows drive is still in beta.
Ubuntu is based on Debian, and to install software on Ubuntu you don’t just download and run installer files. It is recommended that you look for the software in the Ubuntu repositories and install it from the repository. Coming from the Windows world, it takes time to get used to this approach. Also at times you need to add a new repository before you can add a software in that repository. Once you have a basic office machine setup, you would now want to make it a developer machine and get it setup for Java development.
Page 1 OF 2
By default the GCJ Java Virtual Machine is installed with Ubuntu. However for any commercial Java development, you would want to install Sun Java. The Ubuntu repositories take time be updated, so Java 6 isn’t yet available for installation through the repositories. However you can install Sun Java 5. Just find Java 5 in the repositories and install. Ubuntu will handle the download, installation and dependencies.
Note that even after you install Java 5, the JAVA_HOME environment variable doesn’t get set. To set that value you need to execute the following two commands: sudo cp /etc/bash.bashrc /etc/bash.bashrc_backup sudo gedit /etc/bash.bashrc Next append the System-wide Environment Variables at the end of file:
Now your JAVA_HOME value is set, but GCJ will still continue to be the default Java installation. To change it to Sun Java, you would have to execute the following command.
sudo update-java-alternatives -s java-1.5.0-sun
Now your Java environment is setup and you can run java and javac using Sun Java on Ubuntu.
Java IDE / Tools
As regards IDE availability. Eclipse was the only IDE I could find in the repositories. The basic Eclipse platform does get installed fine. However I couldn’t install any additional plugins / upgrades. I am not the only one, and similar Eclipse problems on Ubuntu have been logged earlier.
Even after you make Sun Java your default Java installation, Eclipse continues to run using GCJ. To change this, you need to start Eclipse and navigate to Preferences > Java > Installed JRE and add the Sun JRE to the list. In my case GCJ was at /usr/lib/jvm/java-1.4.2-gcj-4.1-184.108.40.206 while Sun JRE was at /usr/lib/jvm/java-1.5.0-sun-1.5.0.08. Select the Sun JRE as default.
However that didn’t fix the upgrades problem for me. I continued to get errors while trying to install plugins for Eclipse.
So that’s where things stand today. I can run Java commands and do some basic stuff, but Ubuntu is certainly not my primary Java development OS. I haven’t ventured into installing application servers and stuff on Ubuntu, but I am not exactly looking forward to the same. I have already come across posts mentioning issues with some app server installations.
I could find a couple of posts talking of NetBeans and JDeveloper usage on Ubuntu. However neither the NetBeans site nor the JDeveloper site have any specific instructions for Ubuntu.
Overall it looks like Ubuntu – Linux is still a long way from being popular amongst Java developers. It does have a lot of good things going for it, but having to put in some extra effort for getting every little Java thing to work as expected, is quite irritating.
For any computer user whose usage is limited to using the web, an office suite, playing music and maybe the occasional game, Ubuntu is ready. You can dump Windows and switch today. But if you are a software developer, especially a Java software developer and are used to development on Windows, migration to Ubuntu is going to be difficult and might not be worth the effort.
I haven’t yet given up on Ubuntu as my primary work OS and I hope to write more about my experiences with setting up other bread and butter Java developer software.
If you know of any Ubuntu – Java success stories, please do write about them in the comments section below.