JNBridgePro

Bridge anything Java to .NET, Bridge anything .NET to Java

Download

Calling .NET from Java:  Introduction

Suppose you're already using log4net, the Apache logging services package for .NET, to log .NET events, and you need to integrate Java classes, with logging messages from both Java and .NET going to the same output. This demo shows how you can use JNBridgePro to construct a Java console application that calls .NET classes, using Java code to call log4net.

The steps include: (2) start the proxy generator to (5) load the classes, (7) choose and (8) generate the Java proxies that call the .NET classes, (9) create the Java code that calls the proxies, and (11) run the code.

We'll create a Java class j2NLogDemo.MainClass that calls multiple classes in the log4net API. When we run this class, we will see how the logging information appears in the .NET output.

Find out more...