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

javac: file not found: Example.java

I can't compile in the Treet exercise because it does not seem to be able to find the file. Help please!

2 Answers

Craig Dennis
STAFF
Craig Dennis
Treehouse Teacher

Hey Eric!

Looks like you might've accidentally put Example.java in the com directory. Try this, close your Example.java file and then do this in the terminal:

mv com/Example.java .

mv: missing destination file operand after โ€˜com/Example.javaโ€™
Try 'mv --help' for more information.

Okay this worked for example.java but not for treet.java. Any help with treet.java?

Craig Dennis
Craig Dennis
Treehouse Teacher

Compiling Example will automatically compile Treet, as it is imported.
You can now run:

java Example
Craig Dennis
Craig Dennis
Treehouse Teacher

Compiling Example will automatically compile Treet, as it is imported.
You can now run:

java Example

Oh. Derh.