More or less working function to execute a shell command, ext_shell.java and shell_demo.java