The bridge between Java and C #

I was tasked with creating a bridge between C # and Java. It was said that if we use C # right now, and then we get the Java file from another place, we should be able to convert this Java file to .NET so that it can be compatible with our software. The problem is that I do not know what to do or how to start this task. Any suggestions or tips?

It was said that I first have to create platform-independent classes if that helps.

* Edit: Sorry if I wasn’t clear for the first time, because I myself didn’t fully understand the task, therefore I am here. But from what I understand, I need to create a bridge where I can call the Java source code from my .NET file. I have several months to complete it, so I guess I have to make every Java library compatible with C #.

I looked for help and found several similar projects: JNBridge (pay for use), Tangible (free demo) and Janett (open source), so I base my opinion.

** Edit: say, for example, I am creating a Calculator class in Java. I would like to instantiate this class in C #.

+7
source share
3 answers

I never used this, IKVM.NET may be worth checking out.

IKVM.NET is a Java implementation for the Mono and Microsoft.NET Framework. It includes the following components:

- A Java Virtual Machine implemented in .NET - A .NET implementation of the Java class libraries - Tools that enable Java and .NET interoperability 

I once saw this some time ago when I was working with my own .NET-based CMS. This assembly was used, but I'm not sure what capacity it is.

+5
source

Depending on the situation, there are a large number of integration technologies that can be used to connect the two systems. In fact, there is a whole paradigm of software architecture dedicated to this, called service-oriented architecture. Any of the methods used for interservice communication can be used to integrate any two systems, regardless of their size. Of course, there are compromises, but there are always.

Without more information about the systems associated with the system and the required level of integration, it is very difficult to find the final answer to this question.

0
source

From your explanation of what you want from your bridge, it looks like JNBridge could very well solve your problem and save a lot of time by reinventing the wheel. If you have any questions, contact us at JNBridge - there is a link on the site. (Disclosure: Yes, I work for JNBridge.)

0
source

All Articles