Bridge between Java and .NET (intraprocess, fast, object oriented, open-source)
Questions tagged [jni4net]
72 questions
9
votes
1 answer
Java .NET Interoperability
I am developing a .NET website to be hosted on the Parallel Plesk Panel (Windows) and I have some classes written in Java using its swing and JavaMail APIs which I want to use in my website.
I have two options - jni4net and IKVM.net. Just want to…

Nageshwar Saini
- 145
- 2
- 8
5
votes
3 answers
UnsatisfiedLinkError exception while working with dll and java jni4net
I have been working on reading c#(dll) function from java through jni4net and in core java I have succeeded in getting the value from the dll function but now I have created one Dynamic Web Project and tried to use same functionality in servlet. But…

Ashish Sharma
- 332
- 7
- 32
4
votes
2 answers
Two way object passing with jni4net (was: Ignore Missing Class(es))
I am using jni4net to access Java code from within a C# application, and vice-versa. jni4net uses reflection to generate JNI code proxies, so obviously one of the limitations is that your Java and C# code have to compile in order to build…

Chuck Wolber
- 519
- 7
- 15
4
votes
4 answers
Getting Started with JNI and C under Windows
I'm new in Java learning and first time want to get start JNI. And I am working with Cygwin and I have created a file with .java (Helloworld.java) extension as follows:
class HelloWorld {
private native void print();
public static void…

Takianwar
- 41
- 1
- 3
3
votes
2 answers
Jni4net with Java 11
I am using the jni4net to bridge a .net dll to java. It is working fine with in the Java8 environment. Unfortunately, with java 8 I am getting the following error:
I have tried to compile generated jvm with java-11, but still the same…

aze
- 39
- 3
- 6
3
votes
1 answer
JNI4Net C# To Java
I have a simple Java class called jniBridge.Calculator that has one simple method Add(int a, int b). After building the project using eclipse, i exported the project as a JAR file.
I then called proxygen on the JAR file, this produced a folder…

hiddenUser
- 674
- 1
- 7
- 19
2
votes
0 answers
Call Java default method implementation from C# with Jni4Net
I use Jni4Net to call Java from C# and it works great, but if make a C# class which implements a Java interface, I can't use default implementations from the Java interface. Is there a solution or workaround to this problem? Or where can I find…

mKay
- 301
- 1
- 3
- 15
2
votes
1 answer
Generating a .java outof .dll with jni4net
I have my c# class library.
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using Keyence.IV.Sdk;
using System.Reflection;
namespace…

Wulf
- 712
- 5
- 25
2
votes
2 answers
Need to reference and use a C# dll in Java
I need to reference a .Net dll in java. I have used jni4net libraries for the same. I have followed the steps mentioned in the video below :
https://www.youtube.com/watch?time_continue=351&v=8OoSK_RWUe4
I have followed all the steps required to…

Shrinidhi Narasimhan
- 113
- 1
- 10
2
votes
1 answer
Java - jni4net Bridge - Deploying Jar with dll dependenices
I am creating a application utilizing jni4net and a few dll's provided by our vendor (that is to say I have no control over the dll's).
When developing the program in my IDE (Eclipse) I simply placed the jni4net jar's and associated dlls into the…

therk
- 41
- 6
2
votes
1 answer
Cannot generate C# proxy dll with JNI4NET tool, running batch file as trusted assembly?
I am working on getting the tool JNI4NET working so that I can use some Java code I have within my C# application. As a simple initial test I have created a simple Java class library with a single class Person with one method public String GetName()…

KDecker
- 6,928
- 8
- 40
- 81
2
votes
1 answer
IncompatibleClassChangeError jni4net
I'm currently trying to call .NET code using jni4net.
I've managed to create the proxy classes from a .NET .dll using proxygen. However, this code:
Bridge.init();
Bridge.LoadAndRegisterAssemblyFrom(new…

Martín Zaragoza
- 1,717
- 8
- 19
2
votes
0 answers
jni4net , dot net dlls and Spring Boot
I am trying to use Windows dor net Dll in my java web spring boot project.
I have dot net dll who name is operA.dll , this dll (operA.dll) uses other two dll (cmdB.dll and cmdC.dll)
Nowadays I load operA.dll using jni4net , my code to load is :
…

Anderson Rossi
- 493
- 8
- 21
2
votes
1 answer
Jni4Net with different JDK's
I am building C# proxies for Java classes (using proxygen.xml) and my question is: can Jni4Net compile .java files using different JDK than saved in JAVA_HOME variable? Or do I need to change it temporary?
Thanks

alex555
- 1,676
- 4
- 27
- 45
2
votes
0 answers
Porting .Net dll to java using jni4net
While struggling to port a .net code to java, I've found this wonderful program named jni4net. The example codes worked fine for me, but it causes error in my dll.
My dll codes consists of Microsoft Office(powerpoint, word) interop assemblies.…

March3April4
- 2,131
- 1
- 18
- 37