Name:
PID: (page 1)
public ProcessBuilder redirectErrorStream(boolean redirectErrorStream)
Sets this process builder's redirectErrorStream property. If this property is true, then any error output generated by subprocesses subsequently started by this object's start() method will be merged with the standard output, so that both can be read using the Process.getInputStream() method.
public ProcessBuilder command(List<String> command)
Sets this process builder's operating system program and arguments.
public Process start() throws IOException
Starts a new process using the attributes of this process builder.
public abstract InputStream getInputStream()
Returns the input stream connected to the normal output of the subprocess. The stream obtains data piped from the standard output of the process represented by this Process object.
Which line creates and starts a Process?
In ProcessBuilder class
In ProcessBuilder class
In ProcessBuilder class
In Process class
$ javac GradeServer.java Server.java
$ java ExecExamples
hamcrest-core-1.3.jar
junit-4.13.2.jar
/Users/joe/src/list-examples-grader
hello world
list-examples-grader/
lib/
hamcrest-core-1.3.jar
junit-4.13.2.jar
GradeServer.java
Server.java
TestListExamples.java
grade.sh
directory structure
GradeServer.java
What other interesting effects would happen in addition to this output?
Name:
PID: (page 1)
list-examples-grader/
lib/
hamcrest-core-1.3.jar
junit-4.13.2.jar
GradeServer.java
Server.java
TestListExamples.java
grade.sh
directory structure
GradeServer.java
CPATH='.:lib/hamcrest-core-1.3.jar:lib/junit-4.13.2.jar'
rm -rf student-submission
git clone $1 student-submission
echo 'Finished cloning'
cp student-submission/ListExamples.java ./
javac -cp $CPATH *.java
java -cp $CPATH org.junit.runner.JUnitCore TestListExamples
One goal is to be able to run:
$ java Grade https://github.com/...
Cloning into 'student-submission'...
Finished cloning