April 2018
Intermediate to advanced
910 pages
33h 21m
English
What are the limits of JShell? There is so much you can do with this tool, and you are virtually only limited by your imagination and programming abilities.
Let's look at an advanced code base that can be used to compile and run Java programs from a JShell script:
import java.util.concurrent.* import java.util.concurrent.* import java.util.stream.* import java.util.* void print2Console(String thetext) { System.out.println(thetext); System.out.println(""); } void runSomeProcess(String... args) throws Exception { String theProcess = Arrays.asList(args).stream().collect( Collectors.joining(" ")); print2Console("You asked me to run: '"+theProcess+"'"); print2Console(""); ProcessBuilder compileBuilder = ...