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 trialIvailo Hristov
6,297 PointsI 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
2 Answers
lubbo
6,506 PointsHere's what fixed it for me:
Right click "src" -> "Mark Directory as" -> "Sources root"
Grant Murphy
10,072 PointsThis worked for me.
Nevermind now when I run I get a this: Cannot start compilation: the output path is not specified for module "TreeStory". Specify the output path in the Project Structure dialog.
I have spent nearly 2 hours troubleshooting just trying to get these files to compile.
I was able to figure it out
Alexander Nikiforov
Java Web Development Techdegree Graduate 22,175 PointsUsually 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.
https://www.jetbrains.com/help/idea/2016.3/configuring-global-project-and-module-sdks.html
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.
Ivailo Hristov
6,297 PointsIvailo Hristov
6,297 PointsAfter 2 hours of wondering i re-download the file and extract again zip files and then i have no problems :)