Windows judges whether the program is running through the process


foreword

Due to the needs of the project, when program 1 starts, it is necessary to check whether program 2 is started. If it is not started, the user is prompted to start program 2. Native window10-64 bit


1. Running results

Example: Start a self-made electron program named Taotao locally, and monitor whether the program is started.

  1. starting programinsert image description here

  2. execute code
    insert image description here

  3. operation result
    insert image description here

2. Complete code

package com.jeesite

Guess you like

Origin blog.csdn.net/wd4java/article/details/130004058