Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Java Java Objects Harnessing the Power of Objects Abstraction at Play

Unable to access PezDispenser in Jshell jshell> /open PezDispenser doesn't open up what is seen in the video.

Picked up _JAVA_OPTIONS: -Xmx128m
| Welcome to JShell -- Version 9
| For an introduction type: /help intro
^[[B^[[B^[[B^[[B^[[B
jshell> /open PezDispenser
| File 'PezDispenser' for '/open' is not found.

2 Answers

One more thing that has tripped me up here (I'm using VS Code to do the exercises, so more likely to be a problem). If you're not in the directory that the files are in when you start jshell, it can't find them. Be sure you verify with 'ls' before starting jshell

Have you tried /open PezDispenser.java?

Yes, get back operation not found. I see in the questions from 12-17 another user experienced inconsistencies accessing jshell. His question went unanswered. How would this affect moving forward with the techdegree for Java Script?

jshell is used for Java rather than JavaScript.

You could ignore jshell entirely and compile and run your Java code without using it. If being unable to import files is the only issue that you are having with jshell, you could try copying and pasting the code from your files directly into jshell.