use of jdk.jshell.JShell in project jdk9-jigsaw by AdoptOpenJDK.
the class JShellSample2 method main.
public static void main(String[] args) {
JShell shell = JShell.builder().build();
shell.eval("void helloJShell() { System.out.println(\"hello VJUG\"); }");
shell.methods().forEach(v -> System.out.println("Method: " + v.signature() + " " + v.name()));
}
use of jdk.jshell.JShell in project jdk9-jigsaw by AdoptOpenJDK.
the class JShellSample6 method main.
public static void main(String[] args) throws Exception {
JShell shell = JShell.builder().build();
shell.eval(readFile(JShellSample6.class.getResource("commands.repl").getPath())).forEach(e -> System.out.println(e));
}
Aggregations