Stop! Show me your build number!

NumberEvery project that aspires to glory has some kind of regular build process that takes the code out of the code repositories (CVS and the like), compiles it and, hopefully, goes as far as possible towards creating a deliverable entity like an installation kit. In the rest of the post I will assume an installation kit as the end result of the build process but you can replace “installation kit” with whatever deliverable your build produces. Since this build process happens on a regular basis, most of the time as a nightly/daily build, we end up with a lot of these installation kits. (more…)

Exceptional Java – Thoughts on Java exceptions

SurpriseDealing with exceptions is hard. For a while now in the Java world there are two camps. One considers the initial design of the Java exceptions system a sensible one, a feature that contributed greatly to Java’s success. A new camp has also formed in Java world and this new camp considers the original design fundamentally flawed and in dire need of rework. (more…)

More desktop integration: the system tray

TrayOne more nice touch in the Java 6 offensive to the desktop is giving Java applications the ability to add icons to the system tray in a pretty consistent way across platforms. Of course differences exist and they will show up to some degree in the code but at least now the framework exists and the programmer’s effort is a lot smaller. (more…)

Desktop integration with Java 6

DesktopJava 6 tries hard to make Java applications easier to integrate in the desktop environment of various platforms. One of such welcome attempts is the new java.awt.Desktop class adapted from JDIC (JDesktop Integration Components). This API allows access to this functionality: (more…)

Locating resources in Java

EmbersA resource is a file situated somewhere in the class path. It can be a file in a package folder, in the classes folder or in a jar file. Resources are usually needed at runtime and they can be properties files, images and so on. The ClassLoader and Class classes provide methods to find the desired resources but a little bit of attention has to be payed to the quirks of this API. (more…)

Logging garbage collector activity

RecycleAn easy low cost method to check the activity of the garbage collector in the JVM is to tell the JVM to create an activity log. This is achieved for Sun JVMs using the non-standard command line option “-Xloggc:file_name“. This will tell the JVM to create a log file with a content similar with this: (more…)

Console applications with Java 6

ConsoleIn Java 6 a better way of interacting with the command prompt was introduced, the java.io.Console class. Together with the utility class java.util.Scanner introduced in Java 5 this new API can be used to develop more advanced Java console applications. (more…)

  • Calendar

    May 2012
    M T W T F S S
    « Sep    
     123456
    78910111213
    14151617181920
    21222324252627
    28293031  
  • License

    • Creative Commons License