T
T
tac2012-11-07 09:30:29
Java
tac, 2012-11-07 09:30:29

How close are Java and C#?

Interested in how easy and actually how (syntax is interesting if it is a matter of several lines) can be called from Java dll compiled by C# and vice versa?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
I
ivnik, 2012-11-07
@ivnik

From java, you can call .dll / .so either using JNI (the standard way, but more tedious, but you have to write wrappers yourself) or using JNA. The easiest way is to use JNA (but it's slower).

F
Fisik, 2012-11-07
@Fisik

From C#, as far as I understand, you can call any dll using dllimport or something like that, but, in any case, this is not a very wise decision to combine code in one language and dll in another, there will be a bunch of unhandled errors that occur sporadically, which are quite difficult to track.

I
Ivan Nikitin, 2012-11-07
@ivann

Java does not allow you to create dlls, so "the other way around" is not possible. If the method described by lair does not suit you, then you can use sockets for communication between processes or threads (depending on how you load the modules).

T
tac, 2012-11-07
@tac

Has anyone tried this jni4net.sourceforge.net/ ?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question