This post is only tangentially related to
java, since the 3rd party API for the broken USB driver is in java.
Since I purchased an Apple M1 in late 2021 (Apple M1 Max 10/24, MacOS v12.3.1), I have twice encountered USB driver issues with 3rd party software that otherwise works!
This time around, I have a broken USB driver for an otherwise working java API from Ocean Insight for their USB type spectrometers. Perhaps some of you smart people here may think of something I haven't. Maybe there's a work-around.
OceanInsight provides a java API for their spectrometers here ( "OmniDriver+SPAM (Spectral Processing advanced math)" ):
https://www.oceaninsight.com/support/software-downloads/omnidriver-and-spam/
The MacOS app won't launch at all. If I manually open the package contents (right click -> View Package Contents), I can manually run the OmniDriver or osx-intel Unix Executable File that I find inside the package.
When I try this, I get a terminal window with this output:
Which suggests that the executable fails to identify or run an executable consistent with Apple M1 architecture. The osx-intel executable should work, given Apple’s use of the Rosetta compatibility layer. Plenty of other applications operate as the x86/intel versions on this same computer.
If I execute the Windows installer on a Windows machine, I can locate the java archive files (jars) in the installation directory. I can copy those to my MacOS development environment and import the jars into my java class. That code will compile with the jars in the build path. However, running this code results in this stack trace that suggests that there is no compatible USB driver for use on MacOS M1. This is that stack trace:
I can locate the NatUSBWin_64 and NatUSBWin_32 dlls from the Windows installation directory and attempt to use those in my MacOS development build path, which also results in the same stack trace. It’s likely these drivers are Windows only anyway.
If the app fails to unpack on my M1 machine, is it possible to unpack it on an Intel mac, recover the USB driver dylib, and use that in my java project? I unfortunately don't have an Intel mac on hand

.
The package contains a shell script which seems to indicate an execution path depending on CPU type. The original script is:
If I modify this to be:
The behavior is the same when I run this shell script in terminal (script replies with "Bad CPU type in executable").
Has anyone else encountered this type of compatibility issue? Any suggestions or tips would be very much appreciated.
Thanks,