brettwooldridge / NuProcess

Low-overhead, non-blocking I/O, external Process implementation for Java
Apache License 2.0
712 stars 84 forks source link

Compatibility with JNA 5.2.0 #98

Closed anantharaman93 closed 2 years ago

anantharaman93 commented 5 years ago

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)

brettwooldridge commented 5 years ago

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

anantharaman93 commented 5 years ago

I have sent you a Pull Request

anantharaman93 commented 5 years ago

Hi. Can I know any approximate date for release?

anantharaman93 commented 5 years ago

@brettwooldridge Any approximate release date ? Thanks.

bturner commented 5 years ago

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

BullyWiiPlaza commented 4 years ago

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.

arushi315 commented 4 years ago

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?

arushi315 commented 4 years ago

Looks like this issue is fixed in 1.2.5, changes merged as a part of https://github.com/brettwooldridge/NuProcess/pull/99

bturner commented 3 years ago

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