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

Get Error when type in load PezDispenser.java (after java-repl). ERROR: ';' expected load PezDispenser.java;^

How to fix and how can you quit the java-repl?

Please post your code so we can help you.

2 Answers

You are probably forgot to write ":" before load:

:load PezDispenser.java

Make sure you google and see other people errors before posting here. That helps a lot, take a look here, same error as yours I assume:

https://teamtreehouse.com/community/getting-an-error-while-loading-a-file-in-java-repl-saying-its-not-a-statement

https://teamtreehouse.com/community/javarepl-not-loading-in-my-workspace

To quit repl you type:

:quit

Or press 'Ctrl+C'.

Ok, I forgot the ":".

Thank you!

Thank to your help I also found the search function in the forums :) Will use it in future before asking a question.

Great :)