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 trialNAJEEBULLAH KHAN
2,967 Pointsi dont know whats wrong i copy pasted
whyyyyyyyyyyyyyyyyyyyyyyyyy
# Paste your results here
"C:\Program Files\Java\jdk-9\bin\java" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2.5\lib\idea_rt.jar=50119:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2017.2.5\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\HP User\IdeaProjects\systemizer\out\production\systemizer" com.teamtreehouse.main
Error: Could not find or load main class com.teamtreehouse.main
Caused by: java.lang.NoClassDefFoundError: com/teamtreehouse/Main (wrong name: com/teamtreehouse/main)
Process finished with exit code 1
1 Answer
Livia Galeazzi
Java Web Development Techdegree Graduate 21,083 PointsWell, What you copy pasted is a compiler error. The reason your code does not compile seems to be that your class should be called Main, but instead is called main (with a lower case m). Try to correct that and run the code again, see if you still get an error.