brettwooldridge/NuProcess

Compatibility with JNA 5.2.0

anantharaman93 opened this issue · 9 comments

Facing issue when running with latest version of JNA.

Exception faced

Exception in thread "main" java.lang.NoSuchFieldError: SIZE
at com.zaxxer.nuprocess.windows.NuWinNT$ULONG_PTR.(NuWinNT.java:128)
at com.zaxxer.nuprocess.windows.NuWinNT$ULONG_PTRByReference.(NuWinNT.java:141)
at com.zaxxer.nuprocess.windows.ProcessCompletions.(ProcessCompletions.java:79)
at com.zaxxer.nuprocess.windows.WindowsProcess.(WindowsProcess.java:90)
at com.zaxxer.nuprocess.windows.WinProcessFactory.createProcess(WinProcessFactory.java:41)
at com.zaxxer.nuprocess.NuProcessBuilder.start(NuProcessBuilder.java:266)

@suraj1291993 Pull requests are welcome. We have only testing JNA with version 4.5.x. My understanding is that 5.x has substantial changes...

I have sent you a Pull Request

Hi. Can I know any approximate date for release?

@brettwooldridge Any approximate release date ?
Thanks.

I'm also interested in this. Is there anything I can do to help out?

Still the same issue with JNA 5.4.0:

java.lang.NoSuchFieldError: SIZE
	at com.zaxxer.nuprocess.windows.NuWinNT$ULONG_PTR.<init>(NuWinNT.java:128)
	at com.zaxxer.nuprocess.windows.NuWinNT$ULONG_PTRByReference.<init>(NuWinNT.java:141)
	at com.zaxxer.nuprocess.windows.ProcessCompletions.<init>(ProcessCompletions.java:79)
	at com.zaxxer.nuprocess.windows.WindowsProcess.<clinit>(WindowsProcess.java:90)
	at com.zaxxer.nuprocess.windows.WinProcessFactory.createProcess(WinProcessFactory.java:41)
	at com.zaxxer.nuprocess.NuProcessBuilder.start(NuProcessBuilder.java:266)
Exception in thread "main" java.lang.NoClassDefFoundError: Could not initialize class com.zaxxer.nuprocess.windows.WindowsProcess
	at com.zaxxer.nuprocess.windows.WinProcessFactory.createProcess(WinProcessFactory.java:41)
	at com.zaxxer.nuprocess.NuProcessBuilder.start(NuProcessBuilder.java:266)

I hope this is going to be addressed soon so I can start trying/using this library in my project. Thanks.

Seeing this issue in JNA 5.5.0 as well:

Unhandled exception java.lang.NoSuchFieldError: SIZE
	at com.zaxxer.nuprocess.windows.NuWinNT$ULONG_PTR.<init>(NuWinNT.java:128)
	at com.zaxxer.nuprocess.windows.NuWinNT$ULONG_PTRByReference.<init>(NuWinNT.java:141)
	at com.zaxxer.nuprocess.windows.ProcessCompletions.<init>(ProcessCompletions.java:79)
	at com.zaxxer.nuprocess.windows.WindowsProcess.<clinit>(WindowsProcess.java:90)
Unhandled exception java.lang.NoClassDefFoundError: Could not initialize class com.zaxxer.nuprocess.windows.WindowsProcess
	at com.zaxxer.nuprocess.windows.WinProcessFactory.createProcess(WinProcessFactory.java:41)
	at com.zaxxer.nuprocess.NuProcessBuilder.start(NuProcessBuilder.java:266)

Any update?

Looks like this issue is fixed in 1.2.5, changes merged as a part of #99

As of NuProcess 2.0.0, the library is currently compiled against JNA 5.5.0. Just FYI.