Windows:
batfilePath=this.getClass().getResource("/do.bat").getPath().replaceAll("%20", " ").substring(1).replace("/", "\\");
ps = Runtime.getRuntime().exec("cmd /C start /b "+batfilePath+"");
Linux/Unix:
batfilePath=this.getClass().getResource("/do.sh").getPath().replaceAll("%20", " ").replace("\\", "/");
ps = Runtime.getRuntime().exec("sh "+batfilePath);