public void decompile(int timeoutSecs, TaskMonitor monitor) throws IOException {

		monitor.addCancelledListener(listener);

		GTimerMonitor timerMonitor = GTimer.scheduleRunnable(timeoutSecs * 1000, timeoutRunnable);

		try {
			String[] commands = wrapper.getCommands();

			// TODO: JAD will write its output files into its current directory.
			// following line should be changed to wrapper.getOutputDirectory()
			// TODO: JAD will output to file name taken from data inside the .class file.
			// TODO: use -p to force output to stdout.
			process = runtime.exec(commands, environment, wrapper.getWorkingDirectory());

			if (process == null) {
				System.out.println("native process is null");
				return;
			}

			stdin = process.getInputStream();
			stderr = process.getErrorStream();

			readMessagesFromProcess(stdin, "JAD STDOUT " + desc, monitor);
			readMessagesFromProcess(stderr, "JAD STDERR " + desc, monitor);

			waitForProcess();

			disposeState = DisposeState.ENDED_HAPPY;
		}
		finally {
			timerMonitor.cancel();
		}
	}
Controller class for the JAD executable.
Ghidra/Features/FileFormats/src/main/java/ghidra/file/jad/JadProcessController.java