JShell: Difference between revisions
Jump to navigation
Jump to search
(Created page with "==References== * [https://www.future-processing.pl/blog/java-8-through-11-part-1-jshell/ JShell is a new feature of JDK] * [https://docs.oracle.com/javase/10/jshell/introducti...") |
(→JJS) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<source lang="java"> | |||
System.out.println("Hello world!"); | |||
IntStream.range(1, 10).forEach(System.out::println); | |||
/exit | |||
</source> | |||
<source lang="bash"> | |||
jshell <(curl -s 'https://cdn.chorke.org/exec/cli/java/00_hello_world.jsh.txt') | |||
jshell ./00_hello_world.jsh | |||
jshell -v | |||
/exit | |||
</source> | |||
==JJS== | |||
'''jjs>''' load('https://cdn.chorke.org/exec/cli/nashorn/finology/xpresscover/myinit_script.js'); | |||
'''jjs>''' var name = 'Chorke Academia, Inc.' | |||
'''jjs>''' name | |||
Chorke Academia, Inc. | |||
==References== | ==References== | ||
* [https://www.future-processing.pl/blog/java-8-through-11-part-1-jshell/ JShell is a new feature of JDK] | * [https://www.future-processing.pl/blog/java-8-through-11-part-1-jshell/ JShell is a new feature of JDK] |
Latest revision as of 11:21, 21 February 2022
System.out.println("Hello world!");
IntStream.range(1, 10).forEach(System.out::println);
/exit
jshell <(curl -s 'https://cdn.chorke.org/exec/cli/java/00_hello_world.jsh.txt')
jshell ./00_hello_world.jsh
jshell -v
/exit
JJS
jjs> load('https://cdn.chorke.org/exec/cli/nashorn/finology/xpresscover/myinit_script.js'); jjs> var name = 'Chorke Academia, Inc.' jjs> name Chorke Academia, Inc.