brettwooldridge / NuProcess

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

NoSuchMethodError on Java8 JVM #132

Closed madsvonqualen closed 2 years ago

madsvonqualen commented 2 years ago

When using version 2.0.2 on a Java 8 JVM I get this exception:

java.lang.NoSuchMethodError: java.nio.ByteBuffer.limit(I)Ljava/nio/ByteBuffer;
    at com.zaxxer.nuprocess.windows.WindowsProcess.afterStart(WindowsProcess.java:622)
    at com.zaxxer.nuprocess.windows.WindowsProcess.prepareProcess(WindowsProcess.java:308)
    at com.zaxxer.nuprocess.windows.WindowsProcess.start(WindowsProcess.java:232)
    at com.zaxxer.nuprocess.windows.WinProcessFactory.createProcess(WinProcessFactory.java:42)
    at com.zaxxer.nuprocess.NuProcessBuilder.start(NuProcessBuilder.java:259)

According to https://github.com/eclipse/jetty.project/issues/3244#issuecomment-495322586 this is caused by compiling the code with JDK9+ while using the -source/-target flags instead og using the new -release flag.

This issue is not present in version 2.0.1.

slandelle commented 2 years ago

Duplicate of #128

bturner commented 2 years ago

Closing this as a duplicate of #128