ftang
版主
发贴: 214
积分: 38
|
于 2003-03-11 21:58
You have to write a shell script.
In unix, you can use ps to find all the processes running, and based on the name of your Java application, see if your Java application is already running. If it is not already running, then you start your Java application. If already running, then quit.
a simpler way is let your java application produces some output, for example, a file, so in your script you just check if this file exists, if the file does not exist, then you start your Java application, otherwise you quit.
|