Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fire Java method using bash

Suppose I launch a Java application:

java -cp whatever.jar com.example.Start

Process launches ok and keeps running with PID 1314.

Now I would like the system to fire a method by users request.
How can I use bash to signal the running PID and have it fire a method?

like image 755
Frankie Avatar asked Apr 26 '26 01:04

Frankie


1 Answers

My thought is to have bash echo data to the Java processes via a named pipe, which I'm pretty sure Java has support for.

like image 87
Drizzt321 Avatar answered Apr 28 '26 14:04

Drizzt321