Life of the IT-Drummer

A web log from Tobias Rusås Olsen.

Posting feeds to IRC with Pircbot and Spring Integration 2.0

Hi!
Please view the official documentation for more information about Spring Integration 2.0
This will show you how to combine Spring Integration with the PircBot IRC-framework in order to create a bot that can post new updates to IRC.
Before you start off, you need Maven and eclipse. You can manage to do this without eclipse, but I [...]

Read the rest of Posting feeds to IRC with Pircbot and Spring Integration 2.0

Combining Ruby (or Groovy/BeanShell) and Java with Spring Framework.

To combine Ruby and Java might seem like a challenge, but it’s actually quite easy using the Spring Framework. Feel free to follow along with my simple step by step instructions. I make programming FUN! These examples are collected from Spring In Action - Second Edition and uses Spring Framework 2.0.8.
1: Define a regular java [...]

Read the rest of Combining Ruby (or Groovy/BeanShell) and Java with Spring Framework.

Explanations of Exceptions in Java

Came across a great page explaining the different Exceptions which can occour in Java.
Example:

IllegalAccessException
You are a burgler that are running a Java program during a burglery. Please finish stealing the computer, leave the premises and try again.

The rest are found her: http://rymden.nu/exceptions.html

Read the rest of Explanations of Exceptions in Java

Java Abstract Data Type Series: SimpleStack

Today I made a simple stack for you. It’s pretty much as basic as it gets. You push elements, you pop elements, you peek at elements, you get the size of the elements.
Here’s the code:
Node.java:

1
2
3
4
5
6
7
8
9
10
public class Node<E> {
private E content;
private Node<E> below;
 
public Node(E content) { this.content = content; }
public E getContent() { return content; }
public [...]

Read the rest of Java Abstract Data Type Series: SimpleStack

Todays note:

Java EE:
If your application server crashes, and nothing works: Delete stupid .jar files from domain/lib/ext.

Read the rest of Todays note:

GWT, Java and Josh Bloch at Google.

I came over a great talk at youtube the other day, which I really enjoyed. It’s from Joshua Bloch, currently Chief Java Architect at Google, who has worked with Google Web Toolkit (which is like a ajax and javascript written with the Java-language), and also was part of the Java.util.Collection and java.math libraries among others. [...]

Read the rest of GWT, Java and Josh Bloch at Google.

I’m on Youtube (again)!

I recently installed this amazing program “CamStudio”, where you can record things happening at your screen, and record sound at the same time. Since it was functioning rather well, I decided to take it a step further, and record a video of me doing something useful (I guess). So I made a video about SQL-injection [...]

Read the rest of I’m on Youtube (again)!

javax/servlet/jsp/tagext/TagLibraryValidator

If you ever encounter this silly exception, and can’t make any servlet/jsp-page to run, this might be because you have put some .jars (standard.jar og maybe some other jars) in a directory where it shouldn’t have been.
I found this bug really hard to debug, so the best way is to think about where you’ve could [...]

Read the rest of javax/servlet/jsp/tagext/TagLibraryValidator

Java puzzles

Her er en kjekk video der to karer viser en del små kodesnutter, og man skal tippe hva som skjer når de kjører. Det er lagt litt opp som et slags gameshow, så man får svaralternativer. De tar for seg en del javaspesifikke ting, som man kanskje ikke hadde tenkt over. Kjekk underholdning hvis man [...]

Read the rest of Java puzzles