Monthly Archives: February 2013

Ubuntu: Setting up Oracle JDK

Since Oracle’s Java SDK is not part of Ubuntu, there are some steps required to get Java set up on a Ubuntu system. Especially running a 64-bit version of Ubuntu requires one tiny additional step driving you crazy in case do not speak Ubuntu fluently.

There are quite some scripts and tutorials out there how to get Oracle’s Java working on a Ubuntu system, however, there are only a few steps necessary to do so:

Pick the bits from Oracle’s download site and extract the archive using tar. In my case we use the 32-bit version of the JDK

tar -xvf ~/Downloads/jdk-7u15-linux-i586.tar.g

Create a folder and move all the stuff over there

sudo mkdir -p /usr/lib/jvm/jdk1.7.0 
sudo mv jdk1.7.0_15/* /usr/lib/jvm/jdk1.7.0/

Now set up the symbolic links for java, javac and javaws.

sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/jvm/jdk1.7.0/bin/java" 1
sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/jvm/jdk1.7.0/bin/javac" 1
sudo update-alternatives --install "/usr/bin/javaws" "javaws" "/usr/lib/jvm/jdk1.7.0/bin/javaws" 1

Now, create a Bourne script to set the JAVA_HOME variable and update the PATH variable. In case you haven’t used Vim yet, get it using

sudo apt-get install vim

and then create the file

sudo vim /etc/profile.d/java7.sh

edit the file file and add the following export statements

export JAVA_HOME=/usr/lib/jvm/jdk1.7.0
export PATH=$PATH:$JAVA_HOME/bin

Finally execute the script

source /etc/profile

and try to call java. If you run a freshly set up Ubuntu such as mine, you probably will end up the system telling you

bash: /usr/bin/java: No such file or directory

What happened? Actually, we installed a 32-bit version of the JDK, however as mentioned at the beginning running a 64-bit version of Ubuntu and therefore we come back to this very tiny bit missing. One additional package is required to run the 32-bit version: libc6-i386.

“This package includes shared versions of the standard C library and the standard math library, as well as many others. This is the 32bit version of the library, meant for AMD64 systems.”

Said that, get it

sudo apt-get install libc6-i386

and try to run java one more time. It should work now fine.

Confluence Math Formula Macro

As we are dealing quite a lot with mathematics in our current development and using Atlassian’s Confluence as our documentation system, we were looking for a elegant way to document our mathematics in any better way than E=mc^2.

We found the Math Formula macro originally written and tested against Confluence version 3.5, not playing well with the latest Confluence version, we are using.

After following the installation steps there it was, the incompatibility note:

“There are user macros without any metadata configured in their template. They have been highlighted below. For these macros to be available for use in content they require parameter information. See the Guide to User Macro Templates.”

Check out the highlighted macros, and click Edit.

Installed User Macros

In the Template field add the following as the very first line of the template:

## @param size:title=Font Size|type=int|default=150|desc=Font size for formulas in percentage

Within the template, the the font size is referred as $paramsize, however, in the metadata description you denote the param just as size.

Once these changes are made, you can use the macro to create your formulas…

Math Formular Macro

 

I DRAW COMICS REWARDED

A few days ago, I received the reward for backing the Kickstarter project I DRAW COMICS. I really liked the idea of creating a guide how to start drawing, showing you a few of the tricks the pros use during their day job.

As  this was Matt’s second project, there was a quite a chance to receive a high quality result out of the project. As this was my very first non-technical project backed, I was really interested in the outcome.

I DRAW COMICS Sketchbook and Reference Guide 

If you are interested in the sketchbook as well, head over to their website, the sketchbook will be available for pre-order there soon.

Gas 2012 in Numb3rs

Nowadays, a majority of modern life are numbers. Money you earn, money you spend, miles you drive, fly, run or ride by bike. There are many numbers you don’t make any use of. There are even more numbers you don’t think of. There are even numbers you don’t know of.

At the very end it is about what you make out of these numbers. Some time ago I started to run various kinds of data analysis.

For example, in 2012 I went 60 times to the gas station, spending 2774,77 € for gas. Never thought of it being that much. March was a crazy month, it seems I drove three to four times as much as in August where I used to be in vacation or October when I worked mainly from my home office. In November I started a new position, which might explain a new baseline around the 200 € mark – something I definitely should verify end of 2013.

Gas 2012 by Month

I thought I try to pick the cheapest gas station around, however I just realized more than half of the time I went straight to Total, which is just around the corner. This is a clear indicator to compare prices in the future more in detail as there are better prices than Total offers most of the times.

Gas 2012 by Company

It was not that hard to gather the data. Most effort went into how I should compare the data. Neither was the process of thinking about what the actual information might tell me that hard. However, it definitely shows you some ways of improvement for the future.

This is only a subset of data I am currently working on. If you are interested in more analysis, just stay tuned…