ShellCommand_Javaコードでshellスクリプトを実行_Processの入出力エラーフローはすべて閉じる必要がある(3)


public static void executeWithoutResult(String shellFile)
    {
        //     NULL   
        if (null == shellFile || shellFile.equals(""))
        {
            logger.warn("ShellCommand shellFile is null.");
            return;
        }
        
        if (logger.isDebugEnabled())
        {
            logger.debug("bash " + shellFile);
        }
        
        try
        {
            Runtime.getRuntime().exec("bash " + shellFile);
        }
        catch (Exception e)
        {
            logger.error("Execute " + shellFile + " exception:", e);
        }
    }