Note that this example uses sdkman.
CP=$(mktemp) && \
mvn dependency:build-classpath -Dmdep.includeScope=compile -Dmdep.outputFile=$CP -q -f ./pom.xml && \
CP=$(cat $CP) && \
$(sdk home java 11.0.8.hs-adpt)/bin/jshell --class-path $CP
Note that this example uses sdkman.
CP=$(mktemp) && \
mvn dependency:build-classpath -Dmdep.includeScope=compile -Dmdep.outputFile=$CP -q -f ./pom.xml && \
CP=$(cat $CP) && \
$(sdk home java 11.0.8.hs-adpt)/bin/jshell --class-path $CP