Thursday, 26 November 2009

Java: application to check binary class versions

scanner application screenshot

Here's a simple application based on the code from a previous post. You can run it on .class files, .jar files or directories (it'll recursively search them for .class files). It will tell you what version of Java the contained code was compiled for.

Download: javaClassVersionLib_1.1.zip

Tuesday, 17 November 2009

Java: how to use an IllegalArgumentException

Calling my web log Illegal Argument Exception seemed like a clever idea at the time. It is probably just a recipe for confusing Java neophytes searching for their program errors. I should've listened to what my granny used to tell me about clarity, precision, and terseness when choosing identifiers.

To make up for it, here's a short post about IllegalArgumentException (the exception type).