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 Java Objects (Retired) Delivering the MVP Validation

Christopher Borchardt
Christopher Borchardt
2,908 Points

have to restart workspaces

Every time I fix a typo i made when typing up the code, when i try to recompile the code it still shows all the errors and the code as it was before i fixed it. I have saved the document before trying to compile it again.

If i close the workspace and re-open it, the change is shown. But I'm having to do this for every bug. I sent in an email to support and was told to put in a post to the community..

5 Answers

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

What command are you running to compile and run? Can you provide a snapshot of the workspace please?

Christopher Borchardt
Christopher Borchardt
2,908 Points

clear && javac Hangman.java && java Hangman. I'm not sure how to add a screenshot here, i sent a screenshot as a reply to the support email

Craig Dennis
Craig Dennis
Treehouse Teacher

On the top toolbar there is a camera and it lets you create a snapshot so you can share your code. It will produce a URL you can paste here

Christopher Borchardt
Christopher Borchardt
2,908 Points

oh that, yeah i can do that. I was thinking you meant posting an actuall picture :)

https://w.trhou.se/uuqbx3exix

if it helps here is a url for my workspace.

https://teamtreehouse.com/workspaces/20159732#

There are errors in the code, and I'm working through them one by one, mostly typos I made following the video, its just a pain to have to close my workspace and re-open it every time I correct one to see the changes

Craig Dennis
Craig Dennis
Treehouse Teacher

I'm on a phone at the moment so I am having a hard time reproducing, but your promptForGuess method is missing a closing curly brace. See if that helps everything.

Haven't heard this specific problem reported yet...assuming your prompter class isn't compiling and it's confusing things.

Will be around a computer in a few hours and will check if you don't tell me it's fixed ;)

Christopher Borchardt
Christopher Borchardt
2,908 Points

that does help a ton, i knew i was missing a curly brace someplace and that was a big part of my code issues, The main reason i opened this one was just to see if anybody else had had a problem with having to close a workspace and restart it for the code to work.

The reason i noticed it at first is i was exhausted when i first wrote the code so instead of typing || i actually wrote 'or' in the code. and after i corrected the code, no matter how many times i ran the clear and recompile it still showed 'or' as part of the code in the console when displaying errors.

I closed and restarted it, and then it went away.

But the missing currly brace (that i spent WAY more time than I am comfortable admitting trying to find) did fix the rest of the errors on the code and the program works as it should at this state of the game. thank you SO much

Craig Dennis
Craig Dennis
Treehouse Teacher

Glad your code is working! Is the problem resolved? Can you still recreate it? Things seem to be working as expected, and I don't need to restart the workspace to accept changes.

Christopher Borchardt
Christopher Borchardt
2,908 Points

yeah i think it must have been on my PC, today I can't recreate the problem either. I even broke my code on purpose to see if I could make it do it, and it seems to be working as intended.