Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Ivailo Hristov6,297 Points
I can't run Main.java based in treestory project. All three .java's are with list icon with small J on left bottom...
Hello everyone! There are 3 .CLASS files and 3 .java files , nothing compile ...
Exception in thread "main" java.lang.ClassNotFoundException: com.teamtreehouse.Main
Tobias Hallmans6,506 Points
Here's what fixed it for me:
Right click "src" -> "Mark Directory as" -> "Sources root"
Alexander NikiforovJava Web Development Techdegree Graduate 22,161 Points
Usually when you see this, it means JDK is not defined for project. Or defined improperly.
That is why IDE does not know how to read Java files as classes, and consider them plain Java files.
That is where that small J comes from.
Restart helps. Sometimes but not everytime.
But sometimes the problem is simply that the structure of the project has changed. Or it is different. So it is better to solve problem by assigning JDK.