ProcessBuilder ByteBuffer error

I’ve been playing a game that’s written in Java. I host a custom modified dedicated server for it, which is a java command line program. I’m making a wrapper and GUI for it in processing, which has mostly worked out well.

I’ve confirmed with the game dev that I’m using the same version of openJDK to build my dedicated server as he does, however while my processing wrapper works fine with his dedicated server .jar files, if I use one of my modified server .jars with the wrapper, I get

com.badlogic.gdx.utils.GdxRuntimeException: java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at com.badlogic.gdx.backends.headless.HeadlessApplication$1.run(HeadlessApplication.java:101)
Caused by: java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer;
	at io.anuke.mindustry.gen.CallBlocks.onUnitRespawn(CallBlocks.java:348)

From the server program.

If I launch my server from a command line with “java -jar server.jar” it works fine with no errors.
It’s only when I launch it with my processing wrapper that it errors. And it only errors with my builds, not the game dev’s builds. Even if I compile it totally vanilla.

I have read that such errors with bytebuffer can be because of java 8/9 conflicts, but I’ve confirmed I’m set up to only use java 8.

What reason would this be any different from doing “java -jar server-release.jar” in a command prompt(which works fine)

String path = "C:\\Users\\Desktop\\Documents\\Processing\\procTest\\server-release.jar";
String args = "host";
Process proc;

void setup(){
  prepareExitHandler();
  launchServer();
}

void draw(){
}

void launchServer() {
  try {
    String javaPath = "java";
    ProcessBuilder pb = new ProcessBuilder(javaPath, "-jar", path, args);//"host");//, "-l");
    proc = pb.start();
  }
  catch (Exception e) {
    println(e.toString());
  }
  println(proc.isAlive());
}

private void prepareExitHandler() {
  Runtime.getRuntime().addShutdownHook(new Thread(new Runnable() {
    public void run () {
      while (proc.isAlive()) {
        System.out.println("SHUTDOWN HOOK");
        proc.destroy();
        proc.destroyForcibly();
      }
    }
  }
  ));
}