Java ã§å¤é¨ããã»ã¹ãèµ·åããé㯠ProcessBuilder ã¯ã©ã¹ã使ãã¾ããã ãã¾ã«å¦çãæ»ã£ã¦ããªãå ´åãããã¾ãã ãããªå ´åã«åå ã¨ãã¦èããããã®ã¯ãæ¨æºåºåã¾ãã¯æ¨æºã¨ã©ã¼åºåã«ãããã¡ãæºã¾ã£ã¦ãã¾ã£ã¦ããã¨ããçç±ã§ãã ä¾ãã°ä»¥ä¸ã®ã³ã¼ãã®å ´åãæ¨æºã¨ã©ã¼åºåã®ãããã¡ããã£ã±ãã«ãªã£ã¦ããå ´å㯠proc.getInputStream() ããå¦çãè¿ã£ã¦æ¥ãªããªãã¾ãã String[] cmds = {"./foo.sh"}; ProcessBuilder pb = new ProcessBuilder(cmds); Process proc = pb.start(); String str; BufferedReader brstd = new BufferedReader(new InputStreamReader(proc.getInputStre
{{#tags}}- {{label}}
{{/tags}}