Can I call .Net classlibrary from KNIME node ?


I am wondering if it is possible to call a .Net class library from a KNIME node.

Of course I can have a webservice written in a .Net language and call the exposed methods from KNIME. But , since I am mainly a .Net developer, I want to develop my code in .Net , complile to a dll and call the methods in this dll from a KNIME node rather than developing my code using Java.

If someone already succeed doing that, I would appreciate she/he let me know how to achive that.

Any feedback is welcome. Thanks in advance.



My experiance of calling out to other languages is someone limited but I believe if you have a DLL you can use JNI to call out from Java. (after a quick google search is seems there are fundamental differences between C DLLs and .NET DLLs meaning the standard JNI won't work for you, this may be an alternative: 

We have a few internal nodes calling out to DLLs, it can be interesting once deployed due to dependancies and making sure the file is accessible and loadable on other machines but this is certainly all acheivable. 

You will however still need to develop the KNIME node calling out to the DLL in Java. 



Hello Hans-Jürgen,

You can use JNI for integration of Java- and C/C++/C#-libraries. Calling works in both directions. However, the scenario is a bit complicated: you have a VM executing Java, you have a VM executing .Net-assemblies and some kind of dll acting as broker.

As you say, you could code your functionality using C#, expose a webservice providing access to the service, and consume it as a Java-client from a KNIME node. If neccesary, you can also provide a service in the KNIME/Java-environment. If this service-based integration is not feasible, JNI is the only alternative I know. However, I think that using services is the easier way - if your scenario allows to use that architecture.

Hello Hans-Jürgen,

you can also have a look at the source code of the Spotfire extension which uses com4j to call a .Net dll. In the source folder you will find a resource folder that contains documentation about the build and installation process.