mardi 1 avril 2008

I'm a Mac switcher

It's done, I'm an official Mac switcher. I've always been fascinated by Apple computers and Mac OS X but I never had the will and time to switch.
Two weeks ago I decided to buy myself a gift: a brand new 17" MacBook Pro; my old laptop became too noisy and slow anyway. My wallet is still screaming from pain (2500 € / 3900 dollars is a real pain in the ass) but it's worth every single penny; besides I think this box will server me at least for 5 years.
Right now I am exploring the world of Leopard and Mac OS X diverse applications.
I'f you're a fresh switcher like me I advise you to read articles posted on the following websites:
If you're a french speaking person like me, there's a brand new Mac OS X oriented magazine published in France: Competence MAC. Issue 1 is just out and it's all about Leopard. Go ahead and buy it, it's an ideal read in the metro while commuting to work.

Bye bye windows, Linux i'll still use you from time to time :)

mercredi 12 mars 2008

creating a executable wrapper for a java program.

Today I wanted to create a Windows executable wrapper around my java jar files. I find it more handy to create such an executable wrapper for daemon processes I want to add to my Windows "Startup" menu for example.

For that I used an open source program called launch4j (launch4j.sourceforge.net).

Here are the steps needed to create your own executable out of java jar files:

1) Make sure you have your main program jar file, any utility jar and resources files available in the same directory.

2) Make sure that your main program jar file's MANIFEST.MF file contains the following information:
Class-Path: *.jar
where *.jar is the list of jar files your main program needs and that should be in your classpath. For example in my case this was: Class-Path: nsclient4j.jar

Main-Class: PathOfClassContainingMainMethod
where PathOfClassContainingMainMethod is the name of the class that starts your program.
For example in my case this was:
Main-Class: net.sf.rcpperfmon.deamon.HostPerformanceStatsDeamon

3) Start Launch4j and fill these minimally needed information:
- output .exe name.
- main jar file containing the startup class.
- minimum jre version.

Once you press on the build button you should have your .exe correctly create as per the below figure.

Happy coding.....and wrapping.....


dimanche 9 mars 2008

RCP Performance Monitor

During the last couple of months I was intensively reading articles about and learning how to write RCP applications using the Eclipse Rich Client Platform technology.
In the process of learning, I managed to write a simple application (along with its accompanying server side daemon) that can be used to monitor CPU utilization of remote hosts over a network.

The code is hosted on http://code.google.com/p/rcpperfmon/ and is licensed under the LGPL.
Below is a screenshot of my application. I am very excited and happy that I managed to learn how to write Eclipse RCP apps and I am thinking about making a tutorial out of that application.

Keep posted...

Restoring GRUB boot menu from ubuntu live CD.

If windows overwrites your MBR you can boot into any ubuntu live CD and do the following from a terminal window. This happened to me today and the steps below solved my problem.

sudo grub
this will log you into GRUB, you should get a grub> prompt.

find /boot/grub/stage1
This will search for the location where grub is installed and will return a string of the form hd(?,?) which will be used in the next command.

root hd(?,?)
This will tell GRUB the correct location. Do not forget to replace the ? will the values returned frol the previous comand.

setup (hd0)
This will install GRUB on your MBR.

samedi 1 mars 2008

My first steps using the GIMP

Lately, I have been reading some tutorials about the GIMP (GNU Image Manipulation Program). The tool is really powerful and feature rich. One is only limited by their creativity while creating graphics or editing images with the GIMP.

Today, I stumbled across the following short tutorial

Using Gimp to make Web 2.0 Buttons and Graphics

And I managed to create a simple but really cool buttons for my web page. Below is a sample HTML page I crafted in 2 minutes.







mardi 26 février 2008

Compiz brings dynamic desktop effects to my Unbuntu desktop

Lately I've been messing with Ubuntu 8.04 on my desktop PC. I have to say I am really impressed by the usability and feature set of this thing. I has nothing to envy to Mac OS X or Windows Vista.
Today I just installed Compiz and Emerald theme manager on my Ubuntu desktop.
For those who may one day fall on my blog, here are the step I followed in order to install, configure and use Compiz+Emerald:

1) step by step guide to installing Compiz

2) Installing a nice OS X like theme for Compiz

3) Compiz useful shortcuts

Finally some screenshots of my Ubuntu/Compiz desktop and I strongly advise you to try it for yourself.
Thumbs up of the developers of this great piece of software.

Mac OS X like theme:



Example of a special effect:



Compiz Desktop Cube feature:



Compiz Expo feature:

mercredi 13 février 2008

Skype call quality better on (K)Ubuntu

Recently, I've been using Skype a lot to talk to my parents and friends abroad. I've used Skype on Windows XP for a while and most of the time my phone call quality used to degrade. I thought it was because my laptop was not a bleeding edge model and that it's CPU was not powerful enough. Until I installed Kubuntu on my laptop and started to use the beta version of Skype on it. To my surprise call quality was much better.
It is either because the sound subsystem of Linux is better than Windows' one or Skype is better compiled and optimized on Linux than on Windows.
Dual booters, if you use Skype and witness poor quality on Windows consider giving Skype on Linux a try.