Today while trying to solve an issue with Maven I came across the dependency tree plugin. Pretty cool little plugin that prints the dependency tree of a project. If you are working on a multi module project it prints out a dependency tree for each module. Nice. Continue reading
Where is the slf4j encoder pattern documentation?
Wanting to change the way logging information is logged I looked for the slf4j encoder pattern documentation. Why is it so hard to find? It turns out it was not the slf4j documentation I was looking for, but the logback documentation. Duh!
Anyway, it can be found here.
Is the HTTP header Last-Modified always in GMT?
I needed to parse the HTTP header Last-Modified to a Java Date. When I tried to parse the value of the header “Mon, 02 Jun 2008 15:30:42 GMT” it threw an exception java.text.ParseException: Unparseable date. After playing around with the code a bit I figured out I needed to add TimeZone and Locale to get the value to parse correctly. Continue reading
Converting a java.util.Map to scala.collections.Map
While converting an Java servlet example to Scala I ran into a little snag when I had to convert a java.util.Map to a concatenated String in Scala. Actually, I initially couldn’t figure out how to convert java.util.Map to scala.collections.Map. It turned out to be very simple. Here is the code example I came up with and tested with Scala Worksheet in Eclipse. The example is a little more elaborate, because I also needed to convert the Map to a concatenated string of key value pairs. Continue reading
Checking where the JDK is installed under Debian/Ubuntu/Mint
I needed to find out where the Oracle JDK 7 was installed. Using the whereis command did not help. I found that using the following command shows exactly where all available JDKs are installed:
sudo update-alternatives --config java
Installing Oracle JDK 7 in Debian/Ubuntu/Mint
I am currently learning Scala and wanted to install the Scala IDE. In the process I ran into some problems that it programs would not compile correctly, which seemed to be caused by the OpenJDK 7. So I decided to remove OpenJDK 7 and install Oracle JDK 7. All the instructions I could find to do this where downloading based on manually downloading the Oracle JDK 7 and installing it interactively. As I also wanted the installation to work in a Docker container I wanted a fully automated solution. Continue reading