Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Java
  3. zt-process-killer

zt-process-killer

Apache-2.0Javav1.12.0

A Java library for reliably stopping processes with cross-platform graceful and forceful termination.

GitHubGitHub
138 stars27 forks0 contributors

What is zt-process-killer?

ZT Process Killer is a Java library that provides a reliable and cross-platform solution for stopping running processes. It solves the ambiguity of Java's native `Process.destroy()` method by offering consistent graceful and forceful termination across Windows and UNIX systems. The library abstracts both Java-started processes and system processes via PID, ensuring robust process management.

Target Audience

Java developers who need to manage external processes in applications, particularly those requiring cross-platform compatibility, such as build tools, CI/CD pipelines, or server applications.

Value Proposition

Developers choose ZT Process Killer for its stable, well-tested API that simplifies process termination, eliminates platform-specific quirks, and provides features like timeout support and idempotent operations, reducing common errors in process management.

Overview

ZeroTurnaround Process Killer

Use Cases

Best For

  • Stopping processes gracefully in cross-platform Java applications
  • Managing external processes in CI/CD pipelines
  • Handling process timeouts and forceful termination in server applications
  • Integrating process management into build tools like Maven or Gradle
  • Writing reliable integration tests that spawn and clean up external processes
  • Abstracting system process management via PID in Java

Not Ideal For

  • Projects needing access to process output streams or exit codes for system processes
  • Applications requiring comprehensive child process management on non-Windows platforms
  • Scenarios where minimal dependencies are critical and platform-specific code is acceptable
  • Real-time process monitoring or interactive process control beyond termination

Pros & Cons

Pros

Cross-Platform Consistency

Solves the ambiguity of Java's native Process.destroy() by providing consistent graceful and forceful termination across Windows and UNIX systems, as highlighted in the motivation section.

Unified Process Abstraction

Offers a single API for both Java-started processes and system processes via PID, using SystemProcess and PidProcess classes for seamless management.

Robust Timeout Handling

All waiting methods include versions with and without timeouts, allowing precise control over process termination, as specified in the non-functional requirements.

Idempotent Operations

Stopping a process that has already finished is treated as a success, reducing errors in cleanup code and improving reliability.

Cons

No Stream or Exit Value Access

For system processes identified by PID, the library cannot access input/output streams or exit values, limiting use cases that require full process interaction.

Limited Child Process Support

Child process handling is only available on Windows via setIncludeChildren in WindowsProcess, with no equivalent feature for UNIX systems.

Additional Dependency Overhead

Introduces an external library dependency for functionality that might be handled with custom, lightweight platform-specific code in simpler projects.

Frequently Asked Questions

Quick Stats

Stars138
Forks27
Contributors0
Open Issues8
Last commit14 days ago
CreatedSince 2015

Tags

#graceful-shutdown#java-library#integration-testing#timeout-handling#cross-platform#process-management

Built With

J
Java

Included in

Java47.5k
Auto-fetched 18 hours ago

Related Projects

zt-execzt-exec

ZeroTurnaround Process Executor

Stars915
Forks113
Last commit14 days ago
ch.vorburger.execch.vorburger.exec

Java library to launch external processes

Stars41
Forks10
Last commit2 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub