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

The command line is not working!

When I was watching and following along with Craig's Pez Dispenser video he seemed to use the following command on the workspace's command line:

clear && javac Example.java && java Example

And as he expected it cleared and then compiled the file and finally ran Example.java

But for me, it cleared the command line and then it may have compiled and then finally displayed treehouse:~/workspace, how do I make it work like how Craig's worked?

Farouk,

Please provide a link to your workspace and I will take a look.

Regards,

Chris

Interesting...

Each of the 3 commands work fine on their own? i.e java Example runs as expected?

The project was saved and no empty java files?

Any difference in a different browser?

3 Answers

Oh I did not save, may you tell me how I save?

You save from (File > Save all or Save)

I appreciate helping but this happens in all Workspaces I make..