Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Java

Matthew Roberts
PLUS
Matthew Roberts
Courses Plus Student 11,239 Points

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?

Thanks,

Steve.

Matthew Roberts
Matthew Roberts
Courses Plus Student 11,239 Points

https://w.trhou.se/kc9z1lhwrl

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
STAFF
Craig Dennis
Treehouse Teacher

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

Matthew Roberts
Matthew Roberts
Courses Plus Student 11,239 Points

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

Steve.

Matthew Roberts
Matthew Roberts
Courses Plus Student 11,239 Points

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!

Matthew Roberts
PLUS
Matthew Roberts
Courses Plus Student 11,239 Points

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