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


bash: Hangman: command not found

I'm getting this error and can't run my Hangman application.

3 Answers

Hi Matthew,

What are you typing in and in what location?

Can you screenshot the issue?




When I run this in the console I get the error posted above. I can screenshot it but this may be easier to see.

Craig Dennis
Craig Dennis
Treehouse Teacher

Sounds like you are missing the java bit and it's trying to run a program called Hangman.

I type in - clear && javac Hangman.java && Hangman java

that's when I get the error. Now I'm getting a new error when compiling that says -

./Prompter.java:32: error: cannot find symbol
return mGame.applyGuess(guess);
symbol: variable guess
location: class Prompter
1 error

The last phrase needs to be java Hangman


Oh wow I feel ridiculous! haha. thanks guys! Still need help with that second (guess) issue.

Craig Dennis
Craig Dennis
Treehouse Teacher

We've all been there man! And now you know what that error looks like next time it happens! Thanks for asking about it so the next person can find this thread and get their problem magically answered!

Thank you for the great lessons! Look forward to learning more!