running jshell in jdk-17 java.lang.ClassFormatError accessible

25 views Asked by At

I am running jshell like this

jdk-17/bin/jshell --class-path $(echo lib/*.jar | tr ' ' ':') -J--add-opens=java.base/java.time=ALL-UNNAMED

I am getting this exception:

java.lang.ClassFormatError accessible: module java.base does not "opens java.lang" to unnamed module @75cd8043

Why doesn't jshelll pick up the jvm argument passed in?

Thanks

0

There are 0 answers