Is there any Java tool for communicating with an external CLI?

I need a way to communicate with an external tool that has a command line interface from my Java application. Is there a handy / lib tool to make it less painful? Believe me, I've been looking enough. Thank!

+3
source share
2 answers

I ended up using a process handler (more precisely, com.intellij.execution.process.OSProcessHandler) from the Intellij IDEA + platform API, writing my own small command structure in which each command is known as executing itself (write) and analyze the response from the process (read )

0
source

Runtime.exec() . , , , - .

, ProcessBuilder. Java 1.5, :

ProcessBuilder , Runtime.exec. , ProcessBuilder (.. , ).

+3

All Articles