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 Harnessing the Power of Objects Constants

Bartlomiej Roclawski
Bartlomiej Roclawski
587 Points

Openinig PezDispenser issue

I'm trying to open PezDispenser.java :

jshell> open PezDispenser.java

and get this error message

| Error:
| ';' expected
| open PezDispenser.java;

Even with the semicolon used, the same error message pops up.

3 Answers

Reem Javaid
Reem Javaid
920 Points

I am having the same issue! Can anyone help?

James Adamski
James Adamski
3,027 Points

It finally worked for me with:

/open PezDispenser.java

Not quite the same syntax as in the video. Tab started to work too with /open and not open.

Yaser Abidakadr
Yaser Abidakadr
1,935 Points

I had the same problem.

I then realized that the problem is that I have a syntax error inside the java file. once I fixed the error inside the file I ran the command :\

/open PezDispenser.java

it opened immediately