Exception in thread "main" java.lang.NoSuchMethodError: com.sun.jna.IntegerType.<init>(IJZ)V
at com.sun.jna.platform.win32.WinDef\(DWORD.<init>(WinDef.java:131) at com.sun.jna.platform.win32.WinDef\)DWORD.<init>(WinDef.java:121)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at java.lang.Class.newInstance(Class.java:442)
at com.sun.jna.NativeMappedConverter.defaultValue(NativeMappedConverter.java:47)
at com.sun.jna.NativeMappedConverter.<init>(NativeMappedConverter.java:41)
at com.sun.jna.NativeMappedConverter.getInstance(NativeMappedConverter.java:29)
at com.sun.jna.Structure.calculateSize(Structure.java:918)
at com.sun.jna.Structure.allocateMemory(Structure.java:228)
at com.sun.jna.Structure.<init>(Structure.java:145)
at com.sun.jna.Structure.<init>(Structure.java:135)
at com.sun.jna.Structure.<init>(Structure.java:131)
at com.sun.jna.Structure.<init>(Structure.java:127)
at com.sun.jna.platform.win32.WinNT$TOKEN_PRIVILEGES.<init>(WinNT.java:524)
at oshi.software.os.windows.WindowsOperatingSystem.enableDebugPrivilege(WindowsOperatingSystem.java:651)
at oshi.software.os.windows.WindowsOperatingSystem.<clinit>(WindowsOperatingSystem.java:109)
at oshi.SystemInfo.getOperatingSystem(SystemInfo.java:92)
at computerMes.Server.main(Server.java:214)
将问题表达清楚就解决了一半
– dudu 5年前我这就是做一个获取本地计算机的java然后用oshi的jar获取相关接口,程序运行就报这个错
– 余生请多指教ANT 5年前