EDIT: Nevermind, fixed the problem. Matlab needed an additional file in it's bin directory to point to the java libraries. Mod can delete this message if it's not useful.
Hi All,
I'm trying to interface a spectrometer (Ocean Optics USB2000+) with matlab via a wrapper that calls java libraries. The java methods and the wrapper class seem to load into matlab fine, but when I try to send a command to the spectrometer it gives me the following error:
??? Java exception occurred:
java.lang.UnsatisfiedLinkError: no NatUSB in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at com.oceanoptics.uniusb.UniUSB.<clinit>(UniUSB.java :56)
at com.oceanoptics.omnidriver.features.USBImpl.<init> (USBImpl.java:62)
at
com.oceanoptics.omnidriver.spectrometer.USBSpectro meter.<init>(USBSpectrometer.java:96)
at
com.oceanoptics.omnidriver.spectrometer.mayapro200 0.MayaPro2000.<init>(MayaPro2000.java:167)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInsta nce(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newI nstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at
com.oceanoptics.omnidriver.spectrometer.Spectromet erFactory.getAllSpectrometers(SpectrometerFactory. java:193)
at
com.oceanoptics.omnidriver.api.wrapper.Wrapper.ope nAllSpectrometers(Wrapper.java:501)
I suppose that this means java can't find the library 'NatUSB.dll', but I have confirmed that this dll exists and that the PATH environment variable has a pointer to the directory where it is located. What else might have gone wrong here?
Thanks!