Archive for November, 2006

Apache FOP running under Apache Harmony

Sunday, November 12th, 2006

When I found out today, that Apache Harmony now publishes snapshot binaries for Windows, I just had to download one immediately and run Apache FOP under that VM. And guess what, the simple “readme.fo” example from FOP ran just fine. My second attempt with “images.fo”, however, didn’t work (problems with ImageIO and color profiles). Anyway, this means I shall keep an eye on compatibility with Apache Harmony while developing from now on.

One little thing I had to change in FOP to get a little problem was to replace the “UnicodeBig” encoding with “UTF-16BE” in FontFileReader.java (reads TTF files), as “UnicodeBig” doesn’t seem to be available, yet.

Now, I’ll have to set up Harmony for debugging in Eclipse. That, unfortunately, doesn’t seem to work just like that.

Royal Mail Customer Barcode for Barcode4J

Wednesday, November 8th, 2006

Today, I’ve uploaded a new barcode type for Barcode4J: the Royal Mail Customer Barcode (CBC). It’s a kind of “four-state” barcode. There are others like that, for example the Australian variant which uses Reed Solomon error correction instead of a simple checksum like Royal Mail. It should be easy to implement the Australian variant by just handling the checksum differently.

Royal Mail Customer Barcode Example

Next on the list for Barcode4J is finishing the DataMatrix implementation I’ve started a while ago. Looks like I can get enough new features together to release Barcode4J 2.0 by the end of the year.

Quick comparison of start times with Java and IKVM-compiled binaries

Sunday, November 5th, 2006

Today, I was curious about the start times of .NET binaries created from Java sources using IKVM. I took the opportunity to add IKVM compilation (kvmc) to Barcode4J’s build.

If I create a shell script that runs Barcode4J’s command-line (PDF417 barcodes as EPS files) interface 20 times, I get the following times:

  • IKVM 0.30: 15 seconds
  • Sun JDK 1.5.0_08: 8 seconds

So, how does it look like if I do the loop in Java code and create 500 barcodes in one call?

  • IKVM 0.30: 1900ms (first 500), 1400ms (second 500 and subsequent)
  • Sun JDK 1.4.2_10: 1800ms (first 500), 1550ms (second 500 and subsequent)
  • Sun JDK 1.5.0_08: 1800ms (first 500), 1550ms (second 500 and subsequent)
  • Sun JDK 6.0beta: 1700ms (first 500), 1400ms (second 500 and subsequent)

Looks like JVM startup time isn’t so bad compared to .NET. But I don’t know how much overhead IKVM brings into the picture.

(I’ve taken all timings multiple times and have rounded the averages to 50ms. Operating System: WinXP SP2, .NET Framework 2.0. Machine: Custom-built AMD Athlon 64 3200+)