jeudi 9 avril 2015

How to pass commands to an already open CMD Prompt using Java?

I have a .jar that creates a number of users using CPAU.


So when I execute the jar it opened a cmd prompt and executes the command. During this process several cmd prompts are opened for each user. I want to pass the commands to these terminals seperately. Is it possible using java.


Searched a lot and I didnt found anything relevent. One method is using JNA or JNI.


My problem is can I use these opened cmd prompts to stream some commands to them.


Aucun commentaire:

Enregistrer un commentaire