Arman's stuff
Guest
Right Tool for the Job

(Fri Feb 19 16:54:14 2010)

Right tool, right job - and yet, still so wrong.

Visual Basic and Java are not meant to work together. But, I program most of my stuff at work in either one or the other (neither are my choice, believe me). Recently, we began a slight changeover towards using FOP, an FO processor, written completely in Java. Since that which would be calling it was written completely in VB.Net, well, I was a bit at a loss. Then I found a program called IKVM, a .Net implementation of the Java Virtual Machine (JVM). After a lot (a LOT) of fiddling around, I finally got FOP compiled as a .Net library (DLL), and got the two talking to one another.

Things worked pretty well, once I figured out what was going on. See, all the instructions for FOP+IKVM said to reference a library called "ikvm.openjdk.classlibrary.dll". The downside? This library doesn't exist. Oh, it used to exist, maybe even as recently as a couple years ago. But, that was a couple years ago. Now, it's been split into a bunch of different libraries (oh, joy!), which means instead of referring to "ikvm.openjdk.classlibrary.dll", I just needed to refer to "ikvm.openjdk.*.dll". If I would have known that three days ago, this would have been much smoother. Oy...

Meanwhile, it works great, now; I can make an FO document, run it through my simple frontend (middle-end? What do you call the program that goes between the frontend and the backend? Middleware? I dunno...), and tada! Out pops a PDF! It's like magic, only it takes a lot longer!

On the record, I'm not exactly happy with it. I'd much rather have either a native VB.Net program (source), or at least a native DLL that wasn't running a JVM. But, it works, at least for now. There are better ways to do it, but right now, this is the best solution. If I were any of a dozen types of programmer, I'd probably be either foaming at the mouth, or stoically writing my own program. As it is, as long as it does its job, I'm ok with it.

For now.

...stupid Java.

<< More Blaggy GoodnessDowntime and Upgrade >>

This blag is tagged: Java, Vb, Work, All