I received the following error on the first attempt of using the User32.Instance:
Exception in thread \"main\" java.lang.NoSuchMethodError: com.sun.jna.N
Update the maven using below dependency, It worked for me.
net.java.dev.jna jna 4.5.1