0

is there a way that i can link JAVA with C#??
or that i can write a C# code in a Java code??
THNX

4
Contributors
3
Replies
4
Views
11 Years
Discussion Span
Last Post by Lord Soth
0

What exactly are you trying to do?

Be advised that C# and Java do the same things, mostly. Is there something specific that you need Java or C# for that would cause you not to use one explicitly?

If you were talking web applications, you could definitely do things with XML/SOAP to talk between a Java application and a C# application. That's about the only thing that you can do, though-- there's not really an API that I'm aware of that you can use to make the two interact.

0

Greetings:
It can be done via JNI, i once did that in 2 steps, from java to c++ and then from c++ to c#, in java`s webpage there`s a tutorial on doing this, from java to c++ and viceversa.
For writing c# code in Java code, im pretty sure that`s not possible since they`re different languages but as alc6379 said almost everything you can do in C# can be done in Java.

0

Hi,

You have some options. Your first and best bet is to use JNI to expose Java functionality native codes and consume them through Platform Invoke. A more exotic approach would be to use one of the free Java VM implementations in C# so that you can interpret Java code within C#. But my suggestion would be to convert from Java to C#, there are wizards facilitating the whole process a lot and this way you won't suffer performance and type incompatibility problems.

Loren Soth

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.