Hi Folks!
I am having an issue using NativeLibrary directly. I was initially
using jna from groovy where the problem first showed up but I have
since created the simplest possible case in plain java to demonstrate
the problem.
import com.sun.jna.NativeLibrary;
public class TestJna {
public static void main(String[] args) {
NativeLibrary lib = NativeLibrary.getInstance("User32");
lib.dispose();
}
}
Environment: jna 3.0.9, Java 1.5.0_12, Windows XP
Executing the provided class results in the following exceptions to
the console upon exit.
java -cp .\jna.jar;. com.sun.jna.Native$DeleteNativeLibrary
c:\Temp\jna63722.tmp error=193
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
at java.lang.ProcessImpl.start(ProcessImpl.java:30)
at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
at java.lang.Runtime.exec(Runtime.java:591)
at java.lang.Runtime.exec(Runtime.java:464)
at com.sun.jna.Native$DeleteNativeLibrary.run(Native.java:761)
Process finished with exit code 0
I understand what the code in Native is doing and found that the error
193 means: ERROR_BAD_EXE_FORMAT %1 is not a valid Win32 application.
Anyway... Is this a known thing or should a new issue be created?
Thanks