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 Methods and Constants

load PezDispenser.java ... error ?

Hi Everyone, I'm stuck at the very first. When I try to load the PezDispenser.java file into "Workspace" I get this error. --Error not a statement load PezDispenser.java --

I'm sure its something silly. :)

3 Answers

Rob Bridges
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Rob Bridges
Full Stack JavaScript Techdegree Graduate 35,467 Points

Hello, I clicked on the work space to load it up before trying to answer your question, and got the same problem, how I fixed it was

1) make sure you load the java repl, by typing java-repl

2) when hitting the load command be sure to put a colon in front of it, so it's actually :load PezDispenser.java, when I first did this I did just the load PezDispenser.java forgoing the ':' and it gave me the same error, however adding that symbol in front cleared it up.

Thanks!

Let me know if this helps.

Yep that worked, I forgot he " : " at the first. Silly me.

Thanks Rob.