Developer Product Briefs

Use Java Classes in .NET Apps

NBridgePro helps developers bridge the gap.

Many companies have both Java and .NET developers on code projects, but there’s often a significant communication gap between the two camps.

JNBridgePro helps developers bridge that gap. It generates wrappers (or proxies) for Java binaries, so you can call Java classes (running on a Java Virtual Machine) from your .NET code. (The product also generates code to call .NET classes from Java, but that’s not reviewed here.) The platform intercommunication can be through shared memory on the same server, binary transfer (remoting) over TCP, or SOAP. I chose shared memory as the fastest option, while recognizing it isn’t always practical to run two platforms on one machine.

My previous experiences with Java have been mixed, but limited, so I was curious how well this tool could help analyze and take advantage of the functionality of Java projects. The short answer: It helps a lot, and even .NET developers with a severe case of Javaphobia can probably benefit significantly from its functionality.

Setting up proved uneventful, but I should note that the product itself doesn’t ship with a Java runtime. The instructions for the brand-new Visual Studio plug-in also assume knowledge of the older JNBridge standalone utility. In turn, the standalone’s instructions assume you’re familiar with Java-specific terminology. For example, it’s critical to configure various “classpath” values for JAR files.

Figure 1
[Click on image for larger view.]
Build a Bridge to Java Classes. JNBridgePro 4.0 offers Visual Studio 2008 integration so you can generate wrappers for Java classes within the Microsoft IDE. As a .NET developer, it can be hard to figure out the Java dependencies when selecting classes.

With a basic knowledge of the standalone utility, the VS 2008 plug-in made more sense. Installing the product adds a JNBridge project type, DotNetToJavaProxies template, and a JNBridgePro menu to the VS IDE. When you open the generated DotNetToJavaProxies.jnb file, you see a list of eligible Java classes in the Environment column. You click on Add and use the checkboxes to select the Java properties and methods that you want to expose to .NET. This is another area where it helps to know Java and the specific classes you intend to use.

Less than three hours after cracking open the software, I was able to build and reference the required assemblies and run the sample .NET console executable. JNBridge uses a Java class to produce logging info. My exploration to convert the logging sample to a Web application using ASP.NET worked, but it would have been easier with a little more handholding.

For VS 2008 users, I’d like to see the vendor rewrite the Getting Started guide to avoid side-trips to separate manuals, include numbered steps in the procedures, and define Java terms.

JNBridge licenses its products per desktop, per server, and per developer. As such, hooking up an ASP.NET application to Java-based business logic on the back-end would start at $1,390 for the Web server plus $995 for one developer using the Standard Edition. The project I converted worked well, and it hinted at the much larger potential possible for a product like this in enterprise shops. JNBridge’s suitability in that role is beyond the scope of this review, but look for a follow-up review in a future issue of VSM that addresses that particular issue.

At A Glance JNBridgePro 4.0
JNBridge LLC
Web:
www.jnbridge.com
Phone: 877-584-6082
Price: $995 per developer, $1,395 per server, $95 per desktop deployment
Quick Facts: Bridges Java classes and .NET assemblies to allow one to call methods and use properties from the other.
Pros: Offers a quick solution to the Java/.NET divide; uses shared memory, remoting, or SOAP; good integration with Visual Studio environment.
Cons: Documentation needs organization and assumes an understanding of Java; no royalty-free runtimes.

About the Author

Ken Cox is a Canadian .NET programming writer and the author of "ASP.NET 3.5 for Dummies" (Wiley).

comments powered by Disqus

Featured

  • Using Local AI to Cut Copilot Usage-Based Billing Shock

    After being gobsmacked by the new billing plan using almost all my monthly credits in one or two days, I tried pushing some Copilot-style coding work onto local models in VS Code. What I found was less "free AI" and more "pick your pain": cloud charges on one side, heavy local resource use and long waits on the other.

  • .NET 11 Preview 5 Focuses on Performance, Productivity and Safer Code

    .NET 11 Preview 5 focuses on under-the-hood runtime performance gains, streamlined APIs and language features that reduce boilerplate, plus built‑in security checks and incremental ASP.NET Core and EF Core improvements aimed at everyday developer productivity.

  • VS Code 1.124 Focuses on Agent Autonomy and Parallel Sessions

    Microsoft's June 2026 VS Code update turns on Autopilot by default and adds background sending for agent sessions.

  • Developing Agentic Systems in .NET: From Concept to Code

    ZioNet founder Alon Fliess previews his Visual Studio Live! San Diego session on building true agentic systems in .NET -- covering the cognitive loop, MCP tool integration, multi-agent orchestration and enterprise hosting and governance with the Microsoft Agent Framework.

Subscribe on YouTube