Came up with this little “trick” to play around interactively with packages and APIs in jshell (Java's interactive shell) when developing a Maven-based project:
# Gather dependency classpath
mvn dependency:build-classpath -Dmdep.outputfile=deps.cp.txt
# run interactive shell
CLASSPATH=$(cat deps.cp.txt) jshell
Now classes can be imported inside the interactive shell from any libraries used in your project. So that you could experiment with things iteratively.






