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 Creating the MVP Storing Guesses

6 Answers

Christopher Mlalazi

To completely exit out of JSHELL, you us "ctrl-D" if you are using Windows. If you are using Mac, it is "cmd-D".

"ctrl-L" (on Windows), and "cmd-L" (on Mac) will just clear the screen, but leave you in JSHELL. When I am exiting out of JSHELL, using "ctrl-D" (on Windows), it usually takes a few seconds before the regular console shows up. Long enough that I am thinking that it might not have worked. Once the "treehouse:~/workspace$" shows up, I type in "clear" to clear everything off of the console.

Teacher Russell
Teacher Russell
16,873 Points

I'm in the cmd, windows 10, and ctrl + L doesn't work here. It just creates a new line.
Anyone? Anyone?.........

Brent Williams
Brent Williams
3,402 Points

Control-L will clear the jshell console screen

cmd d didn't work for me either. /exit works

Alex Arzamendi
Alex Arzamendi
10,042 Points

Found on SO that in order to do that we need to implement the following command, tried it out myself and it worked

System.out.print("\033[H\033[2J");

Hi guys. I am using a Mac book pro and neither the Cmd L and the Cmd D worked. When I press Cmd L the window selects the page URL on the browser...:(