Hawkscope on Mac. Finally.

Last week I have quit sleeping and did hell of a coding on Hawkscope. And there's a new version, with many significant changes and improvements. To name a few:

  • Works on Mac OS X! (Java 5, Tiger / Leopard)

  • Installer packages for Windows, Mac and Debian (Ubuntu).

  • Settings can finally be changed via Settings Window, like in most normal applications...

  • Speed! Especially noticeable when you have many network drives.

  • Check for updates. A new way to annoy the users!

  • Blacklist. Remove all the shit you don't want to see.

Download links:
hawkscope_0.4.0-1_i386.deb: Debian Package for i386 GTK Linux (Ubuntu)
hawkscope_0.4.0-1_amd64.deb: Debian Package for amd64 GTK Linux (Ubuntu)
Hawkscope-0.4.0.dmg: Mac OS X i386 Package (Tiger/Leopard)
hawkscope-0.4.0-installer.exe: Windows i386 Installer (XP/Vista)


Hawkscope: Getting Better

Finally, I've managed to finish the SWT implementation of Hawkscope GUI. Along with some other minor fixes and improvements it ended up as a new Hawkscope version: 0.3.0.

A list of key points for this release:

  • Tray icon should work with Mac OS X (at least with 64-bit Leopard /w Java 6)

  • Hawkscope menu is more responsive and usable

  • Keyboard navigation through the menu is finally available

  • Each OS/Architecture has it's own build

  • Added -delay <milliseconds> startup parameter as a workaround for Java bug #6438179 that prevented Hawkscope from auto-starting in operating systems like Ubuntu. Read more in the User Guide

By the way, if you're on 64-bit Vista or 64-bit Leopard with Java 6 and you've got Maven in your hands, you could be helpful by providing the build for your OS. Thank You!

If Java is your cocaine, you are welcome to join the development - just contact me.

Download links for the new Hawkscope 0.3.0:

hawkscope-0.3.0-linux-gtk-32.jar - Linux GTK 32-bit Executable JAR
hawkscope-0.3.0-linux-gtk-64.jar - Linux GTK 64-bit Executable JAR
hawkscope-0.3.0-win-32.exe - Windows XP/Vista 32-bit Executable
hawkscope-0.3.0-win-32.jar - Windows XP/Vista 32-bit Executable JAR


Dive into Java

Java Jump-start for experienced software developers. Another presentation I gave at work.


Using Unicode in Java .property files

Using multi-byte characters in Java .property files? Forget the Sun's native2ascii application. Rather than doing the irritating conversions, create UTF-8 encoded .property files, edit them directly and use Utf8ResourceBundle to access them. The code:

package com.varaneckas.utils;

import java.io.UnsupportedEncodingException;
import java.util.Enumeration;
import java.util.PropertyResourceBundle;
import java.util.ResourceBundle;

* UTF-8 friendly ResourceBundle support
* Utility that allows having multi-byte characters inside java .property files.
* It removes the need for Sun's native2ascii application, you can simply have
* UTF-8 encoded editable .property files.
* Use:
* ResourceBundle bundle = Utf8ResourceBundle.getBundle("bundle_name");
* @author Tomas Varaneckas <tomas.varaneckas@gmail.com>
public abstract class Utf8ResourceBundle {

* Gets the unicode friendly resource bundle
* @param baseName
* @see ResourceBundle#getBundle(String)
* @return Unicode friendly resource bundle
public static final ResourceBundle getBundle(final String baseName) {
return createUtf8PropertyResourceBundle(

* Creates unicode friendly {@link PropertyResourceBundle} if possible.
* @param bundle
* @return Unicode friendly property resource bundle
private static ResourceBundle createUtf8PropertyResourceBundle(
final ResourceBundle bundle) {
if (!(bundle instanceof PropertyResourceBundle)) {
return bundle;
return new Utf8PropertyResourceBundle((PropertyResourceBundle) bundle);

* Resource Bundle that does the hard work
private static class Utf8PropertyResourceBundle extends ResourceBundle {

* Bundle with unicode data
private final PropertyResourceBundle bundle;

* Initializing constructor
* @param bundle
private Utf8PropertyResourceBundle(final PropertyResourceBundle bundle) {
this.bundle = bundle;

public Enumeration getKeys() {
return bundle.getKeys();

protected Object handleGetObject(final String key) {
final String value = bundle.getString(key);
if (value == null)
return null;
try {
return new String(value.getBytes("ISO-8859-1"), "UTF-8");
} catch (final UnsupportedEncodingException e) {
throw new RuntimeException("Encoding not supported", e);