An Explanation of ‘this’ in Java
Nov 8th
As every Java programmer should know, code within any non-static method can access the current object via a special reference called ‘this’. Just how this works may not be immediately obvious so I’ve taken a moment to explain it here.
Programming with Inner Classes in Java
Nov 8th
Inner classes are an advanced programming feature in Java. They add another dimension to the concept of Object Oriented programming by allowing objects to not only reside alongside one another, but also within one another too. In this post I’ll explain how inner classes work with the help of an example that illustrates their most common use: Swing GUI programming.
How to strip accents from Strings using Java 6
Oct 23rd
I recently needed a function for stripping characters from a String in Java to make searching for words in a text simpler.
Luckily I was using Java 6 which has a new class in the java.text package that provides a really simple solution for doing this: the Normalizer.
The Normalizer class is capable of performing decomposition of [...]
How to update your Twitter status using Java
Oct 15th
Twitter provide a RESTful API that allows third party applications to access and use their services. In this post I’ll show you how to submit a status update using the this API from a Java application. To do this we’ll need to construct an HTTP POST request. In Java it’s not simple to do this so [...]
How to Access the Size of a Collection in a JSP Page Using JSTL-EL
Jan 9th
A common and frustrating problem that many programmers encounter when first working with JSPs is how to access the size of a Collection using the JavaServer Pages Standard Tag Library (JSTL) and the Expression Language (EL). This article discusses this problem and illustrates a best practice solution.
The Problem
The JSTL and EL greatly reduce the amount [...]
Exposing Spring Beans as JMX Managed Beans in Tomcat
Oct 13th
JMX provides a simple solution to application management. In this article, we’ll look at how Spring beans can be easily exported as a JMX MBean making their methods and properties available from a JMX client application, such as JConsole.
This technique has the following advantages:
Your Java bean’s methods can be triggered manually and interactively (great for [...]
Packaging JavaME Applications with the Antic Ant task
Sep 13th
This article illustrates just how simple it is to correctly package a Java ME Midlet using Smartkey’s freely available Antic Ant task.
Packaging Midlets
Packaging Midlets can be a complex process. Firstly, there are requirements for two files to be created: a Jar and a Jad file. The Jar file will contain all of the classes and [...]

Adding XML to Javadoc comments
Aug 19th
Posted by Steve Neal in Development ...
7 comments
In this article I’ll show you a simple technique for inserting XML code snippets in your Javadocs that keeps them readable in both the source code and the resulting HTML files.
Problems with adding comments
Inserting code snippets into Javadoc comments that read well in both the source code and the HTML files produced by Javadoc can [...]