0

I want to use a tool which is command based(from ubuntu terminal). I want to run commands from inside a java application. I m currently using eclipse for my work.

So far I have tried to use Runtime.exec("xterm") to open the terminal, but I don't know how to run commands on that terminal using java. Also I don't want the terminal to show up on screen, it should run in the background.

  • Do you need to ssh into a different machine or run commands locally? – clinomaniac Mar 12 '18 at 18:01
  • Is the command interactive? Does it require input from the user? Can that input be fed via the command’s standard input? – VGR Mar 12 '18 at 18:20
  • My problem was solved by using this method: https://stackoverflow.com/questions/5711084/java-runtime-getruntime-getting-output-from-executing-a-command-line-program – Sidrah Rashid Mar 13 '18 at 16:31

0 Answers0