- Observer design pattern, Iterator design pattern/streams, Java
Future
s andCompletableFuture
s - Reactive programming and RxJava
- Let's code!
- Reactive programming vs functional reactive programming vs reactive systems
- Questions
JShell snippets were developed and tested with the following toolchain,
however in theory everything should work fine with any JDK 10+
(or JDK 9+ if you replace var
keywords with the proper types)
java version "11.0.2" 2018-10-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.2+7-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.2+7-LTS, mixed mode)
| Welcome to JShell -- Version 11.0.2
Make sure that <JDK_11_installation>\bin
is on your classpath.
In case of you have multiple JDK installation with JShell support on your classpath
then you may have to rearrange your classpath so <JDK_11_installation>\bin
is checked for JShell before any other JDKs.
IntelliJ IDEA 2108.3.5 (Ultimate Edition)
This sample project does not utilize any dependency management tool but by providing a preconfigured IntelliJ IDEA project library sources, JavaDoc and target JDK is prepared for you to ease experimenting.
It's assumed that at this point you have checked out the repo and all your tools are set up and ready for use.
- Fire up a console of your choice
- Navigate to the project folder
- Start JShell as
jshell --class-path ./libs/*
- Open the project in IDEA
- Right click on the project and select
Open in Terminal
- Within the console execute
jshell --class-path ./libs/*
You may have to associate jsh
file types (as JShell Snippet
) if code completion, show JavaDoc or jump to sources does not work.
- As a first step execute
/set start jshell-snippets/init.jsh
This will register a startup script snippet which later can be used to reset the shell and reload the content of demo.jsh
.
- followed by
/reset
Now everything should be ready, you can execute /reset
anytime to discard your changes and reload demo.jsh
.
- and when you're done you can just simply exit
/exit