Skip to main content
Filter by
Sorted by
Tagged with
0 votes
2 answers
166 views

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 { ...
Ronald Calazans's user avatar
0 votes
1 answer
625 views

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 ...
haritha chandramouli's user avatar
1 vote
0 answers
307 views

The module was expected to contain assembly manifest JNI4net error

I am trying to load XceedZip.dll in java using JNI4net/proxygen. when proxygen command is executed I am getting Could not load file or assembly 'file:///C:\Eclipse\JNITest\JNI\XceedZip.dll' or one of ...
Suraj Mishra's user avatar
1 vote
1 answer
648 views

Error in the webapp while connecting with JVM using jni4net from C#

I'm trying to access a simple java code from inside my C# webapp using jni4net, but it is throwing some errors. Generated all proxies and dlls to access the java class. I wrote the code for ...
ashmit-001's user avatar
1 vote
0 answers
152 views

ikvm Unhandled Exception: System.TypeLoadException

I am new for IKVM. I just created the java project with JXL dependent jar to read and write excel files. and converted this project to DLL files by using IKVMC command. ikvmc { jxl.jar -out:jxl.dll }...
Kannan Arumugam's user avatar
0 votes
1 answer
112 views

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 ...
Tan Dylan's user avatar
0 votes
1 answer
2k views

How to call a method in .Net DLL in a Java program

I was trying to use a .NET DLL from Java code, the tsMemberFunctions.DLL is loaded successfully, but the code fails to call the actual function. See the snippet below: public class tsMemberFunctions ...
Himanshu Arora's user avatar
0 votes
1 answer
333 views

How do you include proxygen's "target" folder in a Visual 2017 solution?

I've successfully generated proxies from Java to .NETusing jni4net proxygen. I'm now trying to create a .NET solution in Visual Studio 2017 and use the Java proxies in a .NET console program. I've ...
ruben vilhelmsen's user avatar
1 vote
0 answers
153 views

net.sf.jni4net; Bridge.CreateJVM(bridgeSetup); Could not reserve enough space for 'X'KB object heap;

I am using net.sf.jni4net in my .Net application. While calling: Bridge.CreateJVM(bridgeSetup); When the allocated memory is too big, in Debug Ouput I can see the message: Could not reserve ...
Siutan's user avatar
  • 11
2 votes
0 answers
260 views

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 ...
mKay's user avatar
  • 311
3 votes
2 answers
3k views

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 ...
aze's user avatar
  • 39
1 vote
0 answers
375 views

Accessing C# Object in java as method parameter using jni4net

We are able to call java in C# code and able to pass Strings and integers as method parameters. Able to access Strings are integers directly by using java java.lang.String and java.lang.Integer with ...
kiran h's user avatar
  • 11
2 votes
1 answer
842 views

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....
Wulf's user avatar
  • 712
0 votes
0 answers
264 views

How to investigate JNI errors that only appear in Visual Studio debugger

I am working on a .NET application that is required to use a third-party library (a .NET eBMS/AS4 client); that third-party library is itself a JNI wrapper around a Java library. When I call the ...
David Keaveny's user avatar
0 votes
1 answer
127 views

Java / Azure / Jni4Net / dll / Win32Exception (0x80004005): Access is denied

I have recently deployed my java spring boot app to the Azure app services. Everything is ok until I try to instantiate service class from the third party DLL rolled up in the spring boot up with ...
deedeky's user avatar
  • 45
0 votes
1 answer
473 views

Performance of Javonet

So far, I've gotten Javonet to work to calling a .net dll. It was as easy as advertised to create the javonet code. However, in my case, I have a loop that runs approx 10 million times, and within ...
Jonathan Sylvester's user avatar
3 votes
2 answers
3k views

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=...
Shrinidhi Narasimhan's user avatar
0 votes
1 answer
144 views

jni4net on Docker Ubuntu Host

I have a application developed in Java 8 with SpringBoot, that use jni4net for consuming a dll library. It's posibble make a docker container in Ubuntu to run this application ? Thanks
Jonathan Cordero Duarte's user avatar
2 votes
1 answer
2k views

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 ...
therk's user avatar
  • 41
1 vote
1 answer
2k views

jni4net c# with java in jni4net java.lang.ClassNotFoundException

I built a very small and simple helloWorld program in java (has interface and in class has system.lang.out.println("hello world"))). I wrapped it with proxy gen. Now that I'm trying to attach it to c# ...
aura's user avatar
  • 116
0 votes
2 answers
14k views

c# connect to sql via jdbc

I have a program in c# and need to connect to SQL via JDBC. I read that JDBC works with java and since I need to use it from C#, I found out that there is jni4net that bridges between the two. I can'...
aura's user avatar
  • 116
1 vote
1 answer
739 views

(Lnet/sf/jni4net/inj/IClrProxy;)V error in java for DLL

I am trying to run a C# code in Java with the help of Jni4Net library but I am getting an error whenever I try to create an object of the proxy class. Code: public class JNI_Snow { public ...
user3758867's user avatar
0 votes
1 answer
329 views

KeyNotFoundException when execute proxygen in jni4net

I realise an implementation to connect C# with Java through jni4net. I generated a test class with C# ( conversion the cs file to dll) and called from Java, works fine. My problem is with a dll; ...
Green - 4's user avatar
1 vote
1 answer
642 views

Jni4net, How to define C# events for use in Java

I'm testing out how C# events can be subscribed to from Java code using the jni4net library, but so far have none of the examples I've made worked. I'm trying to send over an array of Body() objects ...
Zamor's user avatar
  • 59
0 votes
0 answers
124 views

Is it possible to debug a C#/.Net program running via jni4net?

I'm making an method call from Java to a C#-DLL via jni4net and I want to debug the C#-Code. I tried the answer in here, but it didn't work for me. What else can I do?
Sven Kirchner's user avatar
0 votes
1 answer
953 views

JNI4NET Proxygen cannot load/find Java class in simple Java class library?

I have managed to get the sample projects for the JNI4NET tool working by generating some Java proxy classes with the ProxyGen.exe program supplied with it. I am now trying to translate this working ...
KDecker's user avatar
  • 7,098
2 votes
1 answer
2k views

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 ...
KDecker's user avatar
  • 7,098
2 votes
1 answer
284 views

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(...
Martín Zaragoza's user avatar
0 votes
1 answer
390 views

How to use JNI4NET when your C# library depends on existing managed dll?

My .NET program I want to use in Java depends on SlimDX, a managed wrapper over DirectX. I add it to the project references as normal without hiccup. However, when it comes to using JNI4NET's build....
Luke Fernandes's user avatar
1 vote
0 answers
286 views

How to handle System.IO.IOException in Java

I'm using jni4net to bridge between Java program & a C# dll file which controls a hardware device. The device and PC are connected by a network cable and I'm trying to handle the cable unplugged ...
Min Naing Oo's user avatar
  • 1,105
0 votes
0 answers
298 views

Netbeans runtime configuration in jar

I have a maven project and jni4net is one of the dependency and it's running fine in Netbeans. But when i package it into a jar i get the error java.lang.UnsatisfiedLinkError: no jni4net.n-0.8.8.0 in ...
Nazim's user avatar
  • 219
2 votes
0 answers
476 views

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 ...
Anderson Rossi's user avatar
1 vote
0 answers
73 views

CLR library dependency path, Java host

I'm writing a sort of device interface in C# and Java. The C# interfaces with the native device libraries and runs a long living worker thread that polls for data. It does some processing and stores ...
ferry's user avatar
  • 437
0 votes
0 answers
667 views

ProxyGen doesn't generate "build.cmd" file

I'm trying to get Jasper Reports working from my app in VB.Net. So, after considering many options, I decided to create a small program in java to launch it, and reference it in my .Net project, using ...
xecollons's user avatar
  • 598
1 vote
1 answer
1k views

Error while calling C# from java using jni4net from 64 bit Os

I am trying to call C# function from java using jni4net which work fine in windows 32 bit os however when I try to load same C# dll from a 64 bit OS am gettig this error C:\Program Files (x86)\csharp\...
Morgan Denis's user avatar
1 vote
2 answers
1k views

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 ...
Eminem's user avatar
  • 7,414
2 votes
1 answer
453 views

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 ...
alex555's user avatar
  • 1,756
1 vote
1 answer
1k views

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 ...
user avatar
1 vote
0 answers
288 views

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 ...
NemugaM's user avatar
  • 11
0 votes
1 answer
315 views

jni4net in c#--Why did not java.util.List list= new java.util.ArrayList();

java.util.List list= new java.util.ArrayList(); // error in c# List list= new ArrayList();// java only: Hashtable hashtable=new Hashtable(); //ok in c#
taotao's user avatar
  • 1
0 votes
1 answer
3k views

JNI4Net java in c# , JNIException

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 ...
taotao's user avatar
  • 1
1 vote
1 answer
2k views

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 ...
Leo Ribeiro's user avatar
1 vote
0 answers
673 views

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....
G4ry's user avatar
  • 13
5 votes
3 answers
1k views

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 ...
Ashish Sharma's user avatar
1 vote
1 answer
416 views

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 ...
amit's user avatar
  • 191
2 votes
0 answers
421 views

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 ...
March3April4's user avatar
  • 2,231
0 votes
0 answers
408 views

Exception in thread "main" java.lang.UnsatisfiedLinkError:******(Lnet/sf/jni4net/inj/IClrProxy;)V--->JNI4net

I used jni4net and created a j4n.dll and a j4n.jar. eclipse understands the imports when I try to instantiate an object using a new button like ISslTcpClient sslTcpClient = new SslTcpClient(); I get ...
Pejman Saberin's user avatar
1 vote
2 answers
682 views

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 ...
Pejman Saberin's user avatar
1 vote
1 answer
1k views

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. ...
Pejman Saberin's user avatar
0 votes
1 answer
2k views

jni4net return value from c# to java

I'm using jni4net to call a library i made in C# (using visual studio 2013) from Java (Eclipse). Here is the code of my C# library : using System; using System.Collections.Generic; using System.Linq; ...
Stefano Franchini's user avatar