04-17-2012 01:18 AM
Hi, I wanted to integrate a Java based API to my application. I am still not knowing what are the inputs of the API. But I need to understand how to integrate APIs in LV application.
Many thanks.
04-17-2012 02:47 AM - edited 04-17-2012 02:51 AM
Well there are several techniques to integrate external code in LabVIEW. The Call Library Node is used to access standard shared libraries (DLLs on Windows), the ActiveX interface is used to access ActiveX components, the .Net interface for .. indeed .Net assemblies. However Java is a bit more tricky as that does not usually come as a shared library and definitely not as ActiveX or .Net component.
I believe there have been attempts to create a Java embedding interface for LabVIEW in the past that could load and execute JARs, but as far as I know they never have reached a mature status. It sure would be a very laborous effort and given Javas moving target character (Java only guarantees compatibilty in its internal functions, not how it can be embedded) and current status also a bit of a risky decision to spend that much time for it.
The most promising way would be to have the Java API execute in its own Java program with some sort of network interface added so that you can connect from LabVIEW to it using network functions.
04-18-2012 02:51 AM
Hi, Thanks for your kind reply. It was disappointing to know that there need to be a great deal of efforts from our side to integrate the Java API in LV 2011. Now, please tell me, how easy / difficult will it be if its a .dll made out of Java?
Anticipating your kind reply.
04-18-2012 04:50 AM
My experience with Java is limited to programming some small Java functionality entirely in Java. So not sure about how to create a DLL from Java code, but if it is created as a normal Windows DLL, then the Call Library node should be able to call it, provided the DLL function interface can be made to conform to standard C programming datatypes and paradigmas.