This is fairly simple in Windows, but a little tricky in Linux. I am using
Runtime.getRuntime().exec(new String[] { "/bin/bash", "-c", "java -classpath /home/4/byz/Orc" });
where Orc is the class file with a main function.
But nothing happens. Are there any settings ? Am I doing something wrong ?
I wish the java program to run in the terminal.
EDIT
Here is the solution:
String[] cmdArray = {"gnome-terminal","java -classpath /home/r/byz/ Orchestrator"};
try {
Runtime.getRuntime().exec(cmdArray);
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
So basically, we have to use gnome-terminal ..
I believe this is already resolved, however I’ll post an answer:
How to Run:
Method:
Let me know if this helps!