I was wondering if i could start a .sh from a .jar file.
I think i would go something like this:
start "test.sh"
but that did not work.
I was wondering if i could start a .sh from a .jar file.
I think i would go something like this:
start "test.sh"
but that did not work.
Yes, you can. Exemplary code in your jar:
Runtime r = Runtime.getRuntime();
Process p = r.exec("./script.sh");
p.waitFor();
BufferedReader b = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = "";
while ((line = b.readLine()) != null)
{
System.out.println(line);
}