Monday, 26 March 2007

Task scheduling in J2SE / J2EE with Quartz

Recently I had to implement a module that would execute a given task once a day. At first I wanted to use Timer class but than I found Quartz.
Quartz is a library for task scheduling for JAVA/J2EE. It is very easy to configure and use. Here are some features that I like:
  • works in both J2SE and J2EE
  • different jobs storing modes (memory or DB)
  • jobs can be declared in XML (no need to compile the code after changes)
  • different triggering modes (e.g. Cron like one)
  • predefined set of triggers e.g. minutely, daily etc.
  • it's for free (Apache License 2.0)

Check it out at: www.opensymphony.com/quartz/

Wednesday, 21 March 2007

Managing Wi-Fi with kNetworkManager

I use Wi-Fi connection at work. I've also got one at home recently. I was looking for a tool for managing wireless networks. I wanted it to be easy in use and configuration, just like at Windows. I've found kNetworkManager. It seems to meet all of my expectations.

I faced some problems at the beginning - it simply didn't want to manage my networks :) I've solved the problem by removing all the lines describing network devices in
/etc/network/interfaces

You can find description (in polish) of installation procedure
here. It also contains tips how to configure password manager so you are not ask for the network password every time you log in.

Tuesday, 13 March 2007

Default browser in KDE

I'm an Opera user, so I would like it to be my default web browser. This short note is about setting a default browser in Kubuntu in general. I experienced some problems trying to make it work.
  • Attempt #1
    First I tried recommended method:
    sudo update-alternatives --config x-www-browser
    At first I thought it worked fine, but first use of Thunderbird proved me wrong. This command works mainly for KDE applications, which thunderbird is not (it opens Firefox by default).

  • Attempt #2
    Ok. Let's try to find it somewhere in system settings. I found something like this:
    System Settings > KDE Components > Default Applications > Web Browser
    This must be it! Oh, it's so easy! No, wait a second - it still doesn't work with Thunderbird :\

  • Attempt #3
    Following instructions from 'Opera help' for KDE environment I tried to associate .html and .htm files with Opera:
    In Koqueror menu bar choose:
    Settings > Configure Konqueror > File Associations > text > html
    You can set there the order in which the application for a given type should be chosen.
    Didn't help.

  • Attempt #4 (successful!!!)
    OK, last try. I'm serious - it's now or never! I switched to Gnome for a moment and set the default browser from there:
    System -> Preferences -> Preferred Apllications
    Quick switch back to KDE and...
    Ladies & Gentleman - we have a WINNER! I mean it works ;)

Useful links:
1. This guy had the same problem.
2. I've found solution here.

Monday, 12 March 2007

Amarok

I love it! Only for the Amarok itself it was worth to switch to Ubuntu. It is nothing revolutionary, but its features are exactly what I need to enjoy my media collection.
It can also deal with last.fm streams, which makes it even more useful.

The coolest feature for me is possibility to control the player using the mouse scroll over the Amarok's tray icon.
  • scroll up/down - volume up/down
  • ctrl + scroll up/down - previous/next song
  • scroll click - pause/play
Oh, I forgot to mention about keyboard shortcuts used for controlling the player that are working also when player's window is not active.

First negative impressions

Linux sucks! ;) Ok, maybe not really, but...

I spent some time on customising my Ubuntu but there are still many things I had in Windows working which I miss in Linux a lot:
  • Open Pandora - there is no Open Pandora player for Linux. I did not find any alternatives as well.
  • Mic in webcam - my Ubuntu can't handle the mic build in USB webcam (Logitech Quickcam Pro 3000). It is probably easy to set up but I'm pretty lazy :P
  • Azureus - actually Azureus is a Java torrent client, so it should be portable. But I just can't get it working correctly on Ubuntu. I use poor kTorrent instead.
  • Flash in Opera - I'm facing the same problem I experienced using Opera 8.x on Windows: Flash player doesn't work right in Opera. Banners and adds don't close when I click "X", application menus don't work etc.. It can be really annoying! I hope next versions will have this bug fixed.
I hope this list won't get much longer.

Saturday, 10 March 2007

KDE

Dafault display manager for Ubuntu is GNOME. My colleagues suggested me to try KDE instead. So I did.

Changing GNOME to KDE:
  • Download & install KDE packages with all their dependencies (around 350MB) using Synaptic Package Manager.
    System > Administration > Synaptic Package Manager
  • Reboot the system.
  • When the login screen appears choose:
    Menu > Session Type > KDE.
That's it.

After couple hours spent with KDE and some changes in default look and components configuration I can say KDE suits me, although the default style seems to be little bit to "candy" for me.

My Desktop looks now like this:

Let's get started

I've chosen Ubuntu 6.06 Dapper Drake as my Linux distribution. It is supposed to be a ready-to-use system, so it should be pretty simple to start with.

The installation went very smooth indeed. After launching the system from bootable CD a graphical enviroment appears. Click the 'install' shortcut to start the installation process. The process itself is very simple, it requires to set only basic parameters and click 'Next' several times. All the hard work the systems does for you.

Now we are ready to go!

Friday, 9 March 2007

Switching to Linux

I've finally decided to join the exclusive comunity of Linux users. As much as I like Windows and the easy of use it offers I also realize that every selfrespecting software developer has to know the Linux basics.

The purpouse of this blog is to gather my knowledge about technical
issues related to Linux installation and usage. The secondary goal of this blog is to improve my english by practice.