add java code which can call shell with return string