I've searched for similar questions, but despite there where a lot with a similar title all have asked something different.
In my case I want that my java program interact with the terminal (Windows) by writing command and reading the response.
I've found the class ProcessBuilder, but does not seem that do what I want
What I' m searching for is something so:
- start the
cmdat some given position (likeC:\Users\federico) - issue a command (
dirorcd desktop); this should not open a command prompt window - read any output that command may result in
and so on, up to the user's exit from the program.