Hi MPS community,
I am trying to get JNA (Java Native Access) working in MPS. Adding stubs in a solution went fine. I also added the library under Java --> Library tab of the solution under which the JNA java stubs were added.
Compiling a language which uses the JNA library works perfectly as well. However, when I try to run code that uses the library from a model, then I get problems like NoClassDefFoundError.
If I add jna.jar to the MPS startup script (in my case mps.bat), then everything works fine. Of course, adding the classpath hardcoded to the MPS startup script is not a proper solution. I've also seen other JARs (like rt.jar from the JDK solution) work perfectly, so it must be possible to tell MPS somewhere in the solution where the JNA stubs reside that it should use jna.jar during runtime use in a model.
A hint as to where I can specify this information would be highly appreciated.