When an enterprise system needs Java and .NET to work together, the default reflex is often to put a network boundary between them: spin up a REST service, define a gRPC contract, or drop a message broker in the middle.
That works fine when loose coupling matters more than latency. It falls apart when you are passing high-frequency events, large binary buffers, or complex object graphs—or when you simply need to reuse a battle-tested Java 8 library inside a modern .NET 10 application without rewriting thousands of lines of code.
In those scenarios, in-process bridging—running the JVM and the CLR inside the exact same OS process—eliminates network serialization entirely.
However, "in-process bridge" is an umbrella term covering very different architectures. Let's look at the three main engineering approaches available in 2026 and their real-world trade-offs.
1. Bytecode-to-IL Transpilation (e.g., IKVM)
How it works: Instead of running a JVM, a static or build-time compiler translates Java .class files (bytecode) directly into .NET Common Intermediate Language (CIL) assemblies.
- The Upside: Once compiled, everything runs natively on the .NET CLR. You do not need to ship or manage a JVM runtime in production.
- The Trade-offs:
- JVM-specific JIT optimizations do not apply, since the code runs on the CLR.
- Support follows the Java API surface implemented by the project (IKVM 8 targets Java 8).
2. Proxy Generation & Shared Memory / TCP (e.g., JNBridgePro)
How it works: A proxy generator inspects your Java JARs (or .NET DLLs) at development time and generates matching wrapper classes. At runtime, a bridge engine marshals calls between the CLR and JVM using either shared memory (same process) or TCP sockets (cross-process or cross-machine).
- The Upside: Established tooling with strong API fidelity and support for both same-process and cross-machine topologies.
- The Trade-offs:
- Proxy assemblies need to be regenerated whenever the underlying Java or .NET APIs change.
- As reported by the vendor, shared-memory calls take roughly 0.01–0.1 ms (10–100 µs) and TCP calls 0.1–1 ms.
3. Direct In-Process JNI Bridging (e.g., JCOBridge)
How it works: Rather than translating bytecode or introducing intermediate serialization protocols, JCOBridge loads the JVM and the .NET CLR inside the same process and connects them directly over the Java Native Interface (JNI)—with zero code injection and no external network channels.
- The Upside:
- Sub-microsecond performance: Direct method invocations run in roughly 0.1–0.5 µs depending on the call and the CPU, while filtered JVM-to-.NET event callbacks can discard unneeded events in 30–45 nanoseconds—comparable to raw JNI overhead.
ReadOnlySpan<T>access toDirectByteBufferdata is zero-copy. - Broad runtime compatibility: Supports Java 8 through Java 25 and .NET Framework 4.6.2+ through .NET 10 and .NET 11 across Windows, Linux, and macOS. You can run legacy Java 8 bytecode inside a modern JVM alongside modern .NET without touching a line of Java code.
- Dynamic + Reflected workflows: You can invoke Java/CLR APIs dynamically without build-time proxy generation, or use pre-built/custom reflected libraries when you want full IntelliSense and strong typing.
- Sub-microsecond performance: Direct method invocations run in roughly 0.1–0.5 µs depending on the call and the CPU, while filtered JVM-to-.NET event callbacks can discard unneeded events in 30–45 nanoseconds—comparable to raw JNI overhead.
- The Trade-offs:
- Strictly in-process (both runtimes live in the same OS process). If you need cross-machine distribution, you pair it with a messaging layer like Kafka.
Architectural Comparison
| Dimension | Bytecode Transpilation (IKVM) | Proxy + Shared Memory (JNBridgePro) | Direct JNI Bridge (JCOBridge) |
|---|---|---|---|
| Runtime Model | CLR only | JVM + CLR (Shared Mem / TCP) | JVM + CLR (same process via JNI) |
| Needs a JVM at runtime | No | Yes | Yes |
| Typical Call Latency | Native CLR execution | 10 – 100 µs (shared memory, as reported by the vendor) | 0.1 – 0.5 µs (our published benchmarks) |
Seeing Direct JNI Bridging in Action
One of the best ways to evaluate a bridge architecture is to look at real-world libraries built on top of it. Several open-source suites use JCOBridge as their underlying engine:
Calling Java from C# (JNet)
Instead of writing glue code, JNet exposes standard JDK APIs—including Java generics—directly in C# syntax:
using Java.Util; // Instantiates a real JVM ArrayList inside the .NET process var list = new ArrayList<string>(); list.Add("Hello from .NET 10"); list.Add("Running on JVM 25"); Calling .NET from Java, Scala, Clojure or Kotlin (JCOReflector)
The same engine works in reverse. JCOReflector reflects .NET assemblies into standard Maven JARs so JVM languages can instantiate .NET classes and generics natively:
import system.Console; import system.collections.generic.List_1; List_1<system.Object> list = new List_1<system.Object>() {}; list.Add(new system.Object()); Console.WriteLine("Count from .NET CLR: " + list.get_Count()); Full Ecosystem Suites
Because the bridge works without protocol translation, entire Java ecosystems can be brought into .NET without re-implementing wire protocols:
- KNet: Full Apache Kafka client, Streams, and Connect SDKs for .NET (plus KEFCore, an Entity Framework Core provider backed by Kafka).
- PLCOnNet: Industrial PLC communication for .NET powered by Apache PLC4X.
- NetPDF: Full Apache PDFBox capabilities in C#.
Benchmark methodology, environments, and results are publicly documented on the JNet performance page, and the CI test matrices (platforms, .NET frameworks, JDK versions and vendors) are visible in the repositories.
Which Approach Should You Choose?
- Choose REST or gRPC if your Java and .NET components are independent microservices that scale separately and can tolerate millisecond-level network latency.
- Choose Bytecode Transpilation (IKVM) if you want to use a Java library directly on the CLR and you cannot deploy a JVM.
- Choose Direct JNI Bridging (JCOBridge) if you need sub-microsecond latency, high-throughput streaming/callbacks, compatibility with Java 8 through 25, or bidirectional interoperability between modern .NET and the JVM without maintaining serialization layers.
Disclosure: I'm responsible for the company behind JCOBridge and these projects.