public File decompile(String className, File classFile, TaskMonitor monitor) throws IOException {

		int lastDotPos = className.lastIndexOf('.');
		String baseName = className.substring(0, lastDotPos);
		File javaOutputFile = new File(classFile.getParentFile(), baseName + ".java");

		Runtime runtime = Runtime.getRuntime();

		List<String> commandsList = new ArrayList<String>();

		commandsList.add(getJadPath());

		if (shouldDecompileDeadCode) {
			commandsList.add("-dead");
		}

		if (shouldOutputFieldsBeforeMethods) {
			commandsList.add("-ff");
		}

		if (!shouldInsertNewLineBeforeOpeningBrace) {
			commandsList.add("-nonlb");
		}

		if (shouldOverwriteOutputFiles) {
			commandsList.add("-o");
		}

		if (shouldRestoreDirectoryStructure) {
			commandsList.add("-r");
		}

		commandsList.add("-radix" + radix.toString());

		if (outputFileExtension != null) {
			commandsList.add("-s" + outputFileExtension);
		}

		if (shouldOutputSpaceBetweenKeywords) {
			commandsList.add("-space");
		}

		if (shouldUseTabsForIndentation) {
			commandsList.add("-t");
		}

		if (verbose) {
			commandsList.add("-v");
		}

		commandsList.add(classFile.getAbsolutePath());

		String[] commands = commandsList.toArray(new String[commandsList.size()]);

		String[] environment = new String[] {};

		File workingDirectory = classFile.getParentFile();

		Process process = runtime.exec(commands, environment, workingDirectory);
		waitForProcessToRespond(process);

		String stdinMessages = readStdinMessagesFromProcess(process, monitor);

		if (SystemUtilities.isInDevelopmentMode()) {
			if (stdinMessages != null && stdinMessages.length() > 0) {
				System.out.println(stdinMessages);
			}
		}

		String stderrMessages = readStderrMessagesFromProcess(process, monitor);

		if (SystemUtilities.isInDevelopmentMode()) {
			if (stderrMessages != null && stderrMessages.length() > 0) {
				System.out.println(stderrMessages);
			}
		}

		return javaOutputFile;
	}
Wrapper class for JAD, a java decompiler.
Ghidra/Features/FileFormats/src/main/java/ghidra/file/jad/OldJad.java