A small issue while trying to execute "R" package using JAVA getting Exited with error code 2 could any one pls help me out...
Runtime run = Runtime.getRuntime(); Process pr = null; String line=null; BufferedReader input = null; try { pr = run.exec("cmd /c R"); input = new BufferedReader(new InputStreamReader(pr.getInputStream())); while((line=input.readLine()) != null) { System.out.println(line); } int exitVal = pr.waitFor(); System.out.println("Exited with error code "+exitVal); } catch (Exception e) { e.printStackTrace(); }