Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

View classpath in jshell

JShell is a REPL for Java. To use additional classes outside the default JRE it contains a /classpath command to add a path to the current classpath.

Is there however a way to view the current classpath within the JShell environment?


Note that I'm using the following early release:

java version "9-ea"
Java(TM) SE Runtime Environment (build 9-ea+111)
Java HotSpot(TM) 64-Bit Server VM (build 9-ea+111, mixed mode)
like image 698
Maarten Bodewes Avatar asked Oct 30 '22 06:10

Maarten Bodewes


1 Answers

The /env command, without arguments, will list your environmental settings, including classpath.

like image 195
Robert Field Avatar answered Nov 10 '22 14:11

Robert Field