The Use Case
Delta Solutions and Strategies initially approached Codemesh looking for a cheaper integration solution. They were already using a JuggerNET competitor to integrate NASA's WorldWind into their .NET application. NASA WorldWind is an open-source virtual globe Java API used in many industry and military applications to create 3-D visualizations of geographical data. WorldWind uses Java's Swing APIs for the visualization and does not come with a .NET API. While the integration solution worked well it was very expensive in deployment.
When Ken Childress, Delta Solutions' lead engineer for this project, approached Codemesh, he did not have very high hopes. He described his integration problem and Codemesh's co-founder Alex Krapf quickly told him that there was a big problem:
JuggerNET lacked one crucial feature that the competing product had: it did not provide the out-of-the-box ability to host a Swing GUI in a .NET application.
That was of course the crucial feature that was the entire point of the integration. Yet maybe there was some hope. Alex asked whether Delta Solutions might be willing to work with a prototype of this feature if Codemesh could get it to work within three days. Ken agreed and Codemesh delivered a working proof of concept within two days.
Based on this success, Ken decided to give JuggerNET a try and replace the old integration solution with JuggerNET. He used JuggerNET to generate over 9,000 .NET proxy types for the entire WorldWind API plus some of Delta Solutions' custom Java types that implemented proprietary features in Java.
There were a few issues related to the naming of types—by default JuggerNET and the previously used tool generated different proxy type names—but JuggerNET's flexible and configurable proxy type naming policies helped overcome them quickly. Once all compilation issues were resolved, Ken fired up the application and sat back to wait.
There was supposed to be a popup window displaying a "Please Wait" message because the previous integration solution could take several seconds to initialize. That popup screen never appeared. Instead the application window appeared immediately. "That can't be right!" was his first thought, "Something must have crashed during the initialization!" But instead JuggerNET had loaded the JVM and the initial classes so fast that the wait screen never had a chance to get displayed.
Codemesh delivered a new integration feature in under three days and it just worked. The new solution saved Delta Solutions and Strategies a lot of money and, as a totally unexpected benefit, it is much faster.
As Ken Childress said:
"The performance of JuggerNET is pretty amazing. One customer deploys our applications in a virtual environment with a number of other vendors' applications. A couple of these application also use WorldWind. Our .NET applications that use WorldWind perform as well, or better, than the native Java applications in the virtual environment."
In addition to the WorldWind integration, we ended up using JuggerNET to incorporate several government-supplied Java libraries that are delivered as jar files. If the Java APIs change we just regenerate the proxy types and rebuild.
Below you can see a screen capture from one of Delta Solutions' .NET applications that use WorldWind. The entire application window is coded in .NET and the globe in the center panel is a WorldWind Swing component that is seamlessly embedded in and controlled by the application.