Skip to main content

Call .NET method from Java

Please note these forums are being decommissioned and use the new and improved forums at
2 replies [Last post]
Joined: 2011-10-13

I need to call a .net method residing inside a .dll file from my java program. I mean interoperability. anybody pls help me on this. I have tried some codes but have lots of issues.

Sample using loadLibrary( ) to call Native methods in Java

I tried this one.. But which tool I have to use for compiling the managed C++. If I use java some libraries wont support and if I use visual studio again some libraries are not supported that residing in java.

pls help me on this.

advance thanks..

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2013-04-02


All the hard work can be left over to java to .net bridge like javonet.

Please check our project on

Javonet is one "jar" that you add to your JAVA project and with our API you can call and load any .NET library from your project directory or GAC. You can create .NET objects, invoke methods, set/get fields and use them like they were native JAVA classes.

Hope it will solve your and other similar users issues with java and .net interoperability.

More details in our quick start guide on official project website:


Joined: 2011-10-07


You can use Java API JNI (Java Native Interface) which is used to call the methods of another language like C/C++.

Try with JNI API.