Sunday, 16 November 2014
Sunday, 10 August 2014
Tuesday, 29 July 2014
Tuesday, 22 July 2014
The last couple of posts have covered how to handle exceptions with Java 8 functional interfaces. This post discusses how to handle arbitrary functional interfaces as of KλudJe 0.2.
Saturday, 19 July 2014
Sunday, 15 June 2014
Wednesday, 5 March 2014
Sunday, 26 January 2014
Software should tell a good story about its errors. Failure to do this in complex applications can lead to hours or days of trying to puzzle out the cause of some seemingly random exception in the production logs.
Here are some tips for writing Java code that generates informative stack traces.
Wednesday, 8 January 2014
Sonatype provide the means and instructions to promote open source software to Maven central. I opted to refactor a small library from a previous post on JSON and publish it as a library called jsonunicode.
Wednesday, 4 December 2013
Here's a small example demonstrating how to convert JSON to XML using JAXB data binding. You might want to use this over streaming where you want to operate on objects in an intermediary step. It is possible to perform the reverse operation but that is not demonstrated here.
- Java 7
- Jackson 2.2
Wednesday, 20 November 2013
I thought I'd take a look at IBM's Java 8 beta multitenancy support. This is a mechanism for sharing runtime resources across Java virtual machine instances. See developerWorks' "Introduction to Java multitenancy."
ibm-java-sdk-ea-8.0-0.0-x86_64-archive3.bin on Linux using a
CentOS-6.4-x86_64-LiveCD.iso based host.
Saturday, 9 November 2013
This post is a follow-up to HOWTO: script WebSphere AS 8.5.5 internet install and describes the post-install steps to create a development workspace.
The clean install described in the previous post requires further configuration before you can start the server and deploy applications.
Wednesday, 9 October 2013
This post describes how to perform a scripted install of a WebSphere Application Server (WAS) development environment from the internet. This is adequate if you want automated installation that will be repeated infrequently. Prior knowledge of WAS, Eclipse and Linux is assumed.
IBM has at least three offerings for basic Java EE development:
- WAS for Developers - the full-fat commercial WAS server
- Liberty Profile - a lightweight, developer-friendly server
- Community Edition - a blue-washed Apache Geronimo
The scripts described here install the first two options with IDE tooling and Java 7. Eclipse Juno is the latest release with this level of WDT support.
Formally, the following are installed:
- IBM WebSphere Application Server for Developers 18.104.22.168
- IBM WebSphere SDK Java Technology Edition 22.214.171.124
- IBM WebSphere Application Server Liberty for Developers 126.96.36.199
- IBM WebSphere SDK Java Technology Edition Version 7.0 for Liberty 188.8.131.52
- Eclipse IDE for Java EE Developers (Juno Sr2; Eclipse 4.2)
- WebSphere Application Server V8.5 Liberty Profile Tools
- WebSphere Application Server V8.5 Tools
Friday, 4 October 2013
I didn't set out to write a MongoDB driver; it came about while I was trying to write proof-of-concept code for my Java binary protocol API. The MongoDB wire protocol just happened to be well documented and easy to implement.
- No binaries have been published; sources are in a git repository.
- The code presented here is not a substitute for the official driver.
- Information pertains to MongoDB 2.2.4.
- APIs may change without warning.
This post is informational; not a tutorial. Everything presented here is pre-alpha code.
Friday, 27 September 2013
The H key stopped working on a Toshiba Equium A110-233 - an obsolete but until now reliable laptop. This was a problem as H was in the power-on password. Notes on the Equium:
Sunday, 15 September 2013
Saturday, 14 September 2013
The JDK 8 Developer Preview came out recently so I thought I would take a look at the API enhancements. This post demonstrates how refactoring to utilize the new types can change code.
This post refers to JDK build 1.8.0-ea-b106. IntelliJ IDEA has good Java 8 syntax support.
Tuesday, 25 June 2013
Versions: Windows 7 (64-bit); go1.1.1 windows/amd64; Java 1.7.0_21
Thursday, 6 June 2013
JSON documents are generally encoded using UTF-8 but the format also supports four other encoding forms. This post covers the mechanics of character encoding detection for JSON parsers that don't provide handling for them - for example, Gson and JSON.simple.
EDIT: 2014; a version of this library has been published to Maven central.
Sunday, 17 February 2013
Versions: Java 7; Rhino 1.7R4; Eclipse Juno (4.2) SR1 (Eclipse IDE for Java EE Developers).