Top Linux Links You Must Click On


A JNI-Bridged Java Desktop Application
Native Performance and Java Control - Bridging Domain Gaps

Another painful experience is debugging in JNI.

I found ETNUS, a JNI IDE where you can debug Java code and native code in the same environment, but it will cost you some extra bucks. However, the context switching between Visual Studio and Eclipse can be really painful. We explored some hardcore turnarounds like using the "_asm int 3" interruption call on Visual Studio so that we could force an interruption call but that's not elegant.

Conclusion
At this point I hope I've convinced you folks that JNI is definitely the right choice for native code access from a Java desktop application in the scenarios involving, say, graphics and numerics in general. CORBA causes headaches, for example, not being able to bind to the ORB because of a local host Naming Service misconfiguration.

JNI overcomes limitations in Java solutions, especially performance.

Another insight we've had is that accessing a native application through some inter-process technology doesn't benefit much from knowing other designs. In JNI this is a tighter conversation.

Legacy code should be well designed for access through JNI.

If your legacy code isn't modularized, it will very hard to access cleanly from Java or from other languages. The solution proposed in the JVipe scenario was only possible due to the well-designed event-oriented native layer.

So I take the current number of solutions coming out as motivation as industry jumps on JNI support. Let's hope for more JNI support from IDE vendors.

References

About Mario de Sa Vera
Mário de Sá Vera is a software architect and works as an IT consultant in Brazil.

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

Mario -- great article.

Just wanted to point out that the product from Etnus, mentioned in the article is a C/C++/Fortran debugger called TotalView, not a Java IDE. It is designed to be used in conjunction with any IDE (or even by programmers who prefer editor and command lines). As Mario points out it can be used to debug the C++ side of JNI applications.

Check it out.

I'm going to share my experience of enabling a graphics-oriented GIS visualization module with a C++ rendering engine for a Java desktop application using JNI technology. The solution was implemented in the GIS library TerraLib as part of the TerraLib Develoment Toolkit (Tdk), applying a JNI-bridged drawing canvas as part of the Components API used by the rendering engine.

I'm going to share my experience of enabling a graphics-oriented GIS visualization module with a C++ rendering engine for a Java desktop application using JNI technology. The solution was implemented in the GIS library TerraLib as part of the TerraLib Develoment Toolkit (Tdk), applying a JNI-bridged drawing canvas as part of the Components API used by the rendering engine.

I'm going to share my experience of enabling a graphics-oriented GIS visualization module with a C++ rendering engine for a Java desktop application using JNI technology. The solution was implemented in the GIS library TerraLib as part of the TerraLib Develoment Toolkit (Tdk), applying a JNI-bridged drawing canvas as part of the Components API used by the rendering engine.


  Subscribe to our RSS feeds now and receive the next article instantly!
In It? Reprint It! Contact advertising(at)sys-con.com to order your reprints!
ADS BY GOOGLE
Subscribe to the World's Most Powerful Newsletters