Java API for National Instruments Drivers

Updated Mar 15, 2018

Reported In


  • NI-DAQmx
  • NI-488.2

Issue Details

  • How can I access National Instruments drivers from Java? 
  • Can I call DAQmx functions from a Java application?


National Instruments does not currently provide language interfaces for Java. It is possible, however, to access National Instruments drivers by making calls to the driver DLL by making a wrapper using the Java Native Interface (JNI). Sun Java includes the JNI which allows calls to be made to C DLLs from Java. This wrapper DLL has to comply with JNI naming requirements, and perform the conversion from Java to C data types.

There are some considerations to be made when doing this. For example, when working with the error cluster, a separate class would be required to handle the data that is contained in an error. Another example is the waveform datatype, which in LabVIEW is a cluster of multiple elements and attributes. These LabVIEW specific data types need to be converted into a data type that Java understands to use National Instruments drivers in a Java environment.


Not Helpful