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 trialJessie Burton
5,198 PointsCant find example.java
Cant compile example.java. I did exactly what he did
I also want to include a snapshot but dont know how
2 Answers
Michael Stedman
Full Stack JavaScript Techdegree Student 13,838 PointsI had the exact same thing happen to me, but it is the result of putting the "Example.java" file in the incorrect folder. Even though I was intentionally trying to put the Example.java file into the root folder, the at the top of the list called "Java Data Structures - Packages", I somehow had gotten it into one of the other folders.
To remedy this, I copied everything that I had already typed into the Example.java file, and then deleted it. Then I collapsed the "com" and "treehouse" folders so that they were closed up. Some where in the regular black space of the navigation area, I right clicked and added a new folder and called it Example.java. I opened it, and pasted the code that I copied from the other Example folder, and then saved it.
To make sure this new Example.java file was not in any other folder or package other than the root one, I expanded and collapsed both of the others to make sure that they did not hide the new file. If they don't do anything to the Example.java file, except for move it down to make room for the other hidden files now being displayed, then you are good. Especially when you collapse both of the folders and the Example.java is still displayed.
Unsubscribed User
427 PointsIn which folder did you put Example.java ? Are you sure that the file is in the root folder ?