I need to run a command at terminal in Fedora 16 from a JAVA program. I tried using
Runtime.getRuntime().exec(\"xterm\");
but this just op
You need to run it using bash executable like this:
Runtime.getRuntime().exec("/bin/bash -c your_command");
Update: As suggested by xav, it is advisable to use ProcessBuilder instead:
String[] args = new String[] {"/bin/bash", "-c", "your_command", "with", "args"};
Process proc = new ProcessBuilder(args).start();