Listing your assets

There are a few JShell commands that are convenient for listing assets that you have created. Using the feedback demonstration from the previous section, we executed the /vars, /methods, and /list commands to provide a list of variables, methods, and all sources respectively:

We can also use the /list -all command and option combination to see what packages the JShell imported. As you can see in the following screenshot, JShell imported several packages that make our work within the shell more convenient, saving us time from having to import these standard packages in our methods:

If you just want to list the startup imports, ...

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.