@SuppressWarnings("resource")
	protected String runThrowError(Function<String, String> scriptSupplier)
			throws Exception {
		JshellAndConnection conn = startAndConnectJshell(scriptSupplier);
		JshellResult r = conn.exec.future.get(TIMEOUT_SECONDS, TimeUnit.SECONDS);
		String stdout = r.handle();
		/**
		 * We know at this point the process should be terminated. Depending on how cleanly that
		 * happened, the socket may or may not be closed. Do not assert/wait for it to close. Just
		 * clean up by closing our end
		 */
		conn.connection.close();
		assertFalse(stdout.contains("Error:"));
		return stdout;
	}
Some snapshot likely to exceed the latest
Ghidra/Test/DebuggerIntegrationTest/src/test.slow/java/agent/java/rmi/AbstractJavaTraceRmiTest.java