Install Oracle JVM in Arch Linux

Unfortunately OpenJDK gives me headaches (eclipse crash in PDT and java applets not starting) in everyday work and I had to switch to OracleJDK (at least for now).

OpenJDK is a dependency on multiple Arch Linux packages so just installing Oracle’s JDK wasn’t enough.

First had to remove icedtea-web

sudo pacman -R icedtea-web

Then build Oracle JRE AUR package,

Before installing OracleJRE I had to remove openjdk6 manually and ignore dependencies:

[argy@Freak jre]$ sudo pacman -Rdd openjdk6

Install OracleJRE

sudo pacman -U jre-7u2-1-i686.pkg.tar.xz

Build and Install JDK AUR package:

sudo pacman -U jdk-7u2-1-i686.pkg.tar.xz

Logout and Login so the PATH gets updated and we are ready to go.

UPDATE: Actually Eclipse crashing had nothing to do with OpenJDK or PDT, but an issue with the installed xulrunner. Workaround available here: 6.1 Autocompletion and javadoc render crash


Switch keyboard layout holding windows key

I find really useful to switch keyboard layout while holding a key. That way I can easily type an English while writing in Greek. Left Windows key is good option for me as I don’t really need it on my Arch Linux powered laptop.

Can be easily setup in /etc/X11/xorg.conf.d/01-keyboard-layout.conf:

Section "InputClass"
        Identifier "keyboard-layout"
        Driver "evdev"
        MatchIsKeyboard "yes"
        Option "XkbLayout"  "us,gr"
        Option "XkbOptions" "grp:alt_caps_toggle,grp:lwin_switch"

A full list is available in /usr/share/X11/xkb/rules/xorg.lst

Take Screenshots on LXDE

Edit the following in ~/.config/openbox/lxde-rc.xml:


<keybind key="Print">
      <action name="Execute">
    <keybind key="A-Print">
      <action name="Execute">

To take a full desktop screenshot:

DATE=`date +%Y-%m-%d\ %H\:%M\:%S`
xwd -root | convert - "$HOME/Desktop/Screenshot-$DATE.png"
notify-send "Desktop screenshot saved!" "A descktop screenshot was saved on your Desktop as:\n Screenshot-$DATE.png" -i /usr/share/icons/Tango/scalable/devices/camera.svg

To take the current window screenshot:

 activeWinLine=$(xprop -root | grep "_NET_ACTIVE_WINDOW(WINDOW)")
 activeWinTitle=$(xwininfo -id $activeWinId | grep 'Window id:' | cut -d"\"" -f2)


while [ -f "$FILENAME" ]; do

 import -window $activeWinId "$FILENAME"

notify-send "Window screenshot saved!" "Windows screenshot was saved on your Desktop as:\n $FILENAME" -i /usr/share/icons/Tango/scalable/devices/camera.svg

Setup an Apache Pivot project in Eclipse

Apache Pivot logoApache Pivot is an open-source platform for building rich web applications in Java. I was looking for a modern UI toolkit and Pivot is exactly that. I’m willing to give a try so I tried to setup some Pivot projects in Eclipse. It actually comes with an Eclipse plugin that simplifies development of Pivot applications.

So here is a quick guide to setup Eclipse for the development of Pivot applications
Continue reading Setup an Apache Pivot project in Eclipse