Eminem
Eminem

Reputation: 7484

How do I call a .Net dll (function) from Java on mono/linux

As the subject says, is this possible? I know of jni4net but its on windows.

Heres an excerpt of the error I get:

Java HotSpot(TM) 64-Bit Server VM warning: You have loaded library /tmp/mydll.dll which might have disabled stack guard. The VM will try to fix the stack guard now.
It's highly recommended that you fix the library with 'execstack -c <libfile>', or link it with '-z noexecstack'.
Native code library failed to load.

Upvotes: 1

Views: 1136

Answers (2)

Wayne Citrin
Wayne Citrin

Reputation: 141

JNBridgePro supports your scenario. It supports running the .NET side on Mono, so the .NET side can run on Linux. See the JNBridge website for more information.

Disclosure: I am with JNBridge.

Upvotes: 0

rems4e
rems4e

Reputation: 3172

You may want to create a function in C that is called from the Java code, and that calls your C# function in return.

Have a look here for the C to C# bridge.

Upvotes: 2

Related Questions