Skip to content

xdpsee/java-cmd-exec

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

java-cmd-exec

A simple wrapper for ProcessBuilder

example

public class Md5sumCommand extends Command {

@Override
protected File directory() {
    return new File(".");
}

@Override
protected String command() {
    return "md5sum";
}


public static void main(String[] args) {
   
   Md5sumCommand command = new Md5sumCommand("test.txt");
   Command.Result result = command.execute();

    System.out.println(result.code); // exit code
   System.out.println(result.output); // stdout output

    

}

}

About

A simple wrapper for ProcessBuilder

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages