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 (Retired) Harnessing the Power of Objects Helper Methods and Conditionals

Mahdi Darwish
Mahdi Darwish
945 Points

Terminating java-repl.

Title says it all. I remember using ctrl+C once but I am not sure if it is actually working. Thanks in advance!

1 Answer

Harry James
Harry James
14,780 Points

Hey Mahdi!

As you've said, Ctrl+C should terminate the REPL for you.

The way you know it's worked is because when you are in the repl, the prefix in the console should be:

java>

When you're not in the repl, the prefix in the console should be:

treehouse:~/workspace$


Hope it helps and if you have any problems with this, give me a shout :)

Mahdi Darwish
Mahdi Darwish
945 Points

Yes. It was some sort of Workplace error that did not allow me to terminate. I closed Chrome and reloaded everything. CTRL + C works! Thanks Harry.

Harry James
Harry James
14,780 Points

Awesome! Glad you got it working in the end :)

I often find that if I have glitches with the Console section of the Workspace, going into View tab and hiding then showing the console often fixes issues so if you ever run into a problem like this again, give it a go!

Why is Ctrl + C used as the hotkey sequence to terminate REPL? It seems odd to use a common hotkey for copy as the way to terminate the program vs. say, the classic Esc key.