Fork of JProcesses with additional features and enhancements. Get cross-platform process details in Java.

Related tags

Utility jProcesses2
Overview

jProcesses2

Fork of JProcesses with additional features and enhancements. Get cross-platform process details in Java. Add this as dependency to your project via Maven/Gradle/Sbt/Leinigen (requires Java 7 or higher).

Features

  • Similar to the Java 9 Process API, but provides more process details and also runs on Java 7 and 8.
  • Parent/child process details and easy cross-plaftform processes priority changing.
  • Easy access to the currently running JVM process.
class Example{
    public static void main(String[] args) {
        ProcessUtils processUtils = new ProcessUtils();
        List<JProcess> list = processUtils.getProcesses();
        for (JProcess process : list) {
            // Collect process details:
            System.out.println(process.name);
            System.out.println(process.pid);
            System.out.println(process.command);
            System.out.println(process.usedMemoryInKB);
            // etc...

            // Parent/Child processes:
            JProcess parent = process.parentProcess;
            List<JProcess> childProcesses = process.childProcesses;

            // Cross-platform priorities and timestamps: 
            JProcessPriority priority = process.getPriority();
            Date timestampStart = process.getTimestampStart();

            // Interact with the process:
            //process.changePriority(JProcessPriority.REAL_TIME);
            //process.stop();
            //process.kill();
            // Commented just in case you want to run this code.
        }

        // Easy access to the running JVM process:
        JProcess thisProcess = processUtils.getThisProcess(list);

        // Print parent/child processes in a tree:
        processUtils.printTree(list);
    }
}

CMDTool

You can also use this as command line tool, by downloading the jar from here: https://jitpack.io/com/github/Osiris-Team/jProcesses2/2.1.3/jProcesses2-2.1.3.jar and running it with java -jar jProcesses2-2.1.3.jar.

out.println("Available commands:");
out.println("help | Prints all available commands. (Shortcut: h)");
out.println("exit | Exit the jProcess2 command line tool. (e)");
out.println("fetch | Fetches all currently running processes details. (f)");
out.println("print | Prints a list with all processes details. (p)");
out.println("print tree | Prints a list with all processes details but also their parent/child relations. (pt)");
You might also like...

An utility to usage efficience ByteArray in Kotlin and Java.

An utility to usage efficience ByteArray in Kotlin and Java.

Sep 29, 2021

Java lib for monitoring directories or individual files via java.nio.file.WatchService

ch.vorburger.fswatch Java lib for monitoring directories or individual files based on the java.nio.file.WatchService. Usage Get it from Maven Central

Jan 7, 2022

Tencent Kona JDK11 is a no-cost, production-ready distribution of the Open Java Development Kit (OpenJDK), Long-Term Support(LTS) with quarterly updates. Tencent Kona JDK11 is certified as compatible with the Java SE standard.

Tencent Kona JDK11 is a no-cost, production-ready distribution of the Open Java Development Kit (OpenJDK), Long-Term Support(LTS) with quarterly updates. Tencent Kona JDK11 is certified as compatible with the Java SE standard.

Tencent Kona JDK11 Tencent Kona JDK11 is a no-cost, production-ready distribution of the Open Java Development Kit (OpenJDK), Long-Term Support(LTS) w

Dec 16, 2022

This repository contains Java programs to become zero to hero in Java.

This repository contains Java programs to become zero to hero in Java. Data Structure programs topic wise are also present to learn data structure problem solving in Java. Programs related to each and every concep are present from easy to intermidiate level

Oct 9, 2022

Preparation and practice for coding interviews

Coding Interviews Preparation and practice for coding interviews Hope you enjoy and help is more than welcome :) Problems by Dificulty A1 1D problems,

Oct 25, 2022

Client for anarchy servers that has bots / auto-modules and other stuff.

AutoBot is a module styled client for anarchy servers that offers bots and auto-modules like ElytraBot which is a pathfinding bot for elytras

Dec 27, 2022

A full-fledged DSA marathon from 0 to 100. An initiative by GFG IIST Chapter and CodeChef IIST Chapter.

A full-fledged DSA marathon from 0 to 100. An initiative by GFG IIST Chapter and CodeChef IIST Chapter.

Full fledged DSA Marathon from Zero to Hundred. Enhance Your Data Structure and Algorithm knowledge with us. A Collaboration Event Series by GFG IIST

Nov 4, 2022

An open-source Java library for Constraint Programming

Documentation, Support and Issues Contributing Download and installation Choco-solver is an open-source Java library for Constraint Programming. Curre

Jan 3, 2023

Java Constraint Programming solver

https://maven-badges.herokuapp.com/maven-central/org.jacop/jacop/badge.svg [] (https://maven-badges.herokuapp.com/maven-central/org.jacop/jacop/) JaCo

Dec 30, 2022
Owner
Osiris-Team
Cooking some delicious code...
Osiris-Team
(cross-platform) Java Version Manager

jabba Java Version Manager inspired by nvm (Node.js). Written in Go. The goal is to provide unified pain-free experience of installing (and switching

Stanley Shyiko 2.5k Jan 9, 2023
The shell for the Java Platform

______ .~ ~. |`````````, .'. ..'''' | | | |'''|''''' .''```. .'' |_________| |

CRaSH Repositories 916 Dec 30, 2022
Gephi - The Open Graph Viz Platform

Gephi - The Open Graph Viz Platform Gephi is an award-winning open-source platform for visualizing and manipulating large graphs. It runs on Windows,

Gephi 5.1k Dec 30, 2022
Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.

Discord4J is a fast, powerful, unopinionated, reactive library to enable quick and easy development of Discord bots for Java, Kotlin, and other JVM languages using the official Discord Bot API.

null 1.5k Jan 4, 2023
Utility for developers and QAs what helps minimize time wasting on writing the same data for testing over and over again. Made by Stfalcon

Stfalcon Fixturer A Utility for developers and QAs which helps minimize time wasting on writing the same data for testing over and over again. You can

Stfalcon LLC 31 Nov 29, 2021
A tool ot export, analyse and visualize your transactions, rewards and commissions of your liquidity mining pools or DEX transactions

A tool ot export, analyse and visualize your transactions, rewards and commissions of your liquidity mining pools or DEX transactions.

Adam·Michael 15 Mar 11, 2022
Java Constraint Solver to solve vehicle routing, employee rostering, task assignment, conference scheduling and other planning problems.

OptaPlanner www.optaplanner.org Looking for Quickstarts? OptaPlanner’s quickstarts have moved to optaplanner-quickstarts repository. Quick development

KIE (Drools, OptaPlanner and jBPM) 2.8k Jan 2, 2023
Object-Oriented Java primitives, as an alternative to Google Guava and Apache Commons

Project architect: @victornoel ATTENTION: We're still in a very early alpha version, the API may and will change frequently. Please, use it at your ow

Yegor Bugayenko 691 Dec 27, 2022
Dex : The Data Explorer -- A data visualization tool written in Java/Groovy/JavaFX capable of powerful ETL and publishing web visualizations.

Dex Dex : The data explorer is a powerful tool for data science. It is written in Groovy and Java on top of JavaFX and offers the ability to: Read in

Patrick Martin 1.3k Jan 8, 2023
Java Collections till the last breadcrumb of memory and performance

Koloboke A family of projects around collections in Java (so far). The Koloboke Collections API A carefully designed extension of the Java Collections

Roman Leventov 967 Nov 14, 2022