Bridge between Java and .NET (intraprocess, fast, object oriented, open-source)
Questions tagged [jni4net]
72 questions
1
vote
2 answers
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…

Eminem
- 7,206
- 15
- 53
- 95
1
vote
1 answer
proxygen throws System.NullReferenceException
I want to use a dll file in our java application, I am using jni4net, when i tried to create proxy for our Dll it throws
System.NullReferenceException: Object reference not set to an instance of an object.
at…
user1220590
1
vote
0 answers
How to Enable/load App.config in java
I have created a C# project(dll) that I need to call from java. The C# project has dependendecies (dlls) that were compiled using c2.0 of .net. The machine am using has been installed with .net 4.5. I am compiling the C# project using .net 3.0 and…

NemugaM
- 11
- 5
1
vote
1 answer
jni4net - java.lang.UnsatisfiedLinkError: net.sf.jni4net.Bridge.initDotNet()I
I've found this library and I loved it so much... But I can't start using it... I don't know what I'm doing wrong, but can anyone help me?
I've read the wiki and environment setup. And I'm trying to do a simple hello world in Java calling C#.
But…

Leo Ribeiro
- 228
- 1
- 16
1
vote
0 answers
jni4net : How to pass a Map as parameter to a C# method from Java?
I'm trying to use jni4net in my Java program to call methods from a C# .dll library.
Bridge.setVerbose(true);
Bridge.init(new File("jni4net.n.w64.v40-0.8.8.0.dll").getAbsoluteFile());
Bridge.LoadAndRegisterAssemblyFrom(new…

G4ry
- 13
- 4
1
vote
1 answer
Is it possible to execute java application (which is dependent on many 3rd party libs) from C# code using tools like IKVM/JNI4Net?
I want to call java API from c# code. My Java API is a jar file bundled with several 3rd party libraries. I am trying to use IKVM and JNI4Net. I am able to call few java functions but when code has dependency over 3rd party libs, it shows error:…

amit
- 181
- 2
- 4
- 20
1
vote
2 answers
Exception in thread "main" java.lang.UnsatisfiedLinkError: firstdata.icvtnsclient.SslTcpClient.__ctorSslTcpClient0(Lnet/sf/jni4net/inj/IClrProxy;)V
I made a jni4net jar and dll file from a third party dll file. I get the error mentioned in the title section. My first question is can I use the jni4net jar file directly, just the way I work with a regular jar file? The error I am getting is…

Pejman Saberin
- 69
- 5
1
vote
1 answer
Exception in thread "main" java.lang.Error: Unresolved compilation problems: JNI4net
I am working with JNI4net and although the libraries and installed in the build path and eclipse recognizes them, it still gives me run time error. Why could that be in your opinion? Here is the code.
import net.sf.jni4net.*;
import…

Pejman Saberin
- 69
- 5
1
vote
1 answer
java.lang.String cannot be cast to system.Object
I have used JNI4NET framework to invoke .Net code from Java.
JNI4NET has generated proxy class for .Net code. One of the methods accept system.Object as an input parameter.
I want to send String value as input to that method. I have wrote the below…
user4429612
1
vote
1 answer
Running tests with jni4net bridge code using nunit
I am writing some tests for a project that bridges a java component into C# using jni4net. I am able to run the tests using resharper with no issues, but nunit seems to be unable to locate the needed jar
var setup = new BridgeSetup(true);
…

Jroc1187
- 21
- 4
1
vote
2 answers
System.IO.FileNotFoundException when running Bridge.LoadAndRegisterAssemblyFrom(File arg0) with Jni4net
I am trying to make a Jni4net program to act as a bridge between a Java database and a C# application. After doing a few of the samples coming with Jni4net I tried following this guide. After following it thoroughly at the point where his program…

user1254588
- 31
- 4
0
votes
0 answers
Is it possible to run 3rd party library C# code in Java in a background service? Unity3D
I am developing an application which has an android client and a pc server. I have gotten stuck at this part for a while now due to the nature of the problem.
The network structure is based on the 3rd party library, RiptideNetwork if anyone is…

MikeyMike
- 1
- 2
0
votes
2 answers
Error calling jni4net on a webService, URI scheme is not "file"
I'm using jni4net, I'm reading a .NET dll in a java application, and it works when I run direct on the main method. Below is an example:
public static void main( String[] args ) throws IOException {
Bridge.setVerbose(true);
…

Ronald Calazans
- 71
- 1
- 11
0
votes
1 answer
Using jni4net to use Native DLL function in java and getting System.BadImageFormatException
I am using jni4net to use the DLL function in Java.
Using jni4net-0.8.6.0-bin I compile using the command:
.\proxygen.exe "D:\sampledlls\sample_interface.dll" -wd "D:\hope"
On executing this command , getting the following…
0
votes
1 answer
When creating jni4.jar file, it shows 'javac' is not recognized as an internal or external command, operable program or batch file
Once I run proxygen and generated clr and jvm file and build.cmd
Then I run build.cmd, but it only create a empty folder named target.
I used command prompt to run the build.cmd, it show "javac is not recognized as an internal or external…

Tan Dylan
- 1
- 2