4 ms·
shagie@MacM1 ~ % docker run -it openjdk:latest jshell Unable to find image 'openjdk:latest' locally latest: Pulling from library/openjdk ... Sta
by shagie 1y ago
shagie@MacM1 ~ % docker run -it openjdk:latest jshell
Unable to find image 'openjdk:latest' locally
latest: Pulling from library/openjdk
...
Status: Downloaded newer image for openjdk:latest
Oct 01, 2025 6:23:46 PM java.util.prefs.FileSystemPreferences$1 run
INFO: Created user preferences directory.
| Welcome to JShell -- Version 18.0.2.1
| For an introduction type: /help intro
jshell> 0.1 + 0.2 > 0.3
$1 ==> true
jshell>
This has been around since JDK 9. https://docs.oracle.com/en/java/javase/17/jshell/introduction-jshell.html https://docs.oracle.com/en/java/javase/17/jshell/introductio...
That said, changing how you think about programming... even with jshell I still think Java in classes and methods (and trying to pull in larger frameworks is not as trivial as java.lang packages). However, I think Groovy (and a good bit of Scala) in a script writing style.
jshell itself is likely more useful for teaching than for development - especially once you've got a sufficiently complex project and the ide integration becomes more valuable than the immediate feedback.
Still, something to play with and one of the lesser known features of Java.