What Java Needs Now - A Great, Free Way To Interoperate With .NET
Java is a great platform, and a great language. In fact, as I’ve said before, it’s my overall favourite programming language. Particular strengths are Java’s many and varied APIs. And, as Tim Bray points out, the Java community is really paying attention to developer productivity in the face of stiff competition - check out Netbeans 5.5 if you haven’t done so already.
However, one area where Java doesn’t do so well is interacting with hardware. You want to write a Java program to burn CDs? Good luck finding a nice Java API. You want to write a Java program that talks to a USB port? Good luck finding a nice Java API. Even where APIs are defined (e.g. for serial port communications) good, free implementations of APIs are thin on the ground.
What does all this mean? Well, it means that if you need to do this kind of programming, you often can’t use Java, even if you want to. And 90% of the time, statistics means that you’ll be programming on Windows, which, today, means you’ll probably choose to program to the .NET platform, for example using C#. However, if you’re heavily invested in Java, you may not want to write your whole system in C#.
All of which brings me to the point of this blog entry. Wouldn’t it be great if there was free software that let software running on the Java platform, interoperate with software running on .NET? I don’t mean via Web Services (which is doable today, and, as Danny Coward recently blogged, is super-easy with Mustang) but at a more fine-grained level. Such a Java/.NET bridge would open up huge opportunities. There are commercial solutions available today that enable this, but the economics of these preclude writing free or low-cost software.
Now, for those not afraid of CORBA, there are Open Source workarounds to this problem that add an extra lay of complexity. For example IIOP.NET, provides for an IIOP-based entry into .NET remoting, which Java programmers can take advantage of (see an old article from 2003 on how to to make C# and Java code interoporate using IIOP.NET). Of course, if you hava a lot of free time, and don’t mind writing code that’s full of bugs, accessing C# from Java via JNI is always a possibility. And if you don’t mind a quick (but very dirty) solution, rolling your own C#-Java IPC system using sockets is pretty easy.
My assertion, then, is that both Microsoft and Sun would benefit from making a high-performance low-level Java/.NET bridge and super-easy to use tools freely available. So, speaking as both a Sun customer and a Microsoft customer, I’d really like to see the folks and Sun amd MS commit to this. Oh, and if they could make it available yesterday, that would be really handy ![]()
Vitaly wrote:
I have already developed regular JNI for .NET. It has the same functionality as C++ version. See Object-Oriented JNI for .NET (low-level) at
http://www.simtel.net/product.phpid95126SiteIDsimtel.net
Posted 26 Jun 2006 at 9:53 am ¶