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 Java Basics Getting Started with Java Introduction to Your Tools

Error: Could not find or load main class

Got the compiled class file but Java run command gets me Error: Could not find or load main class

2 Answers

Using both IntelliJ and NetBeans import java.io.Console; Console console = System.console(); console = console.printf("Hello TreeHouse");

I got Null pointer exceptions, where as: changed to System.out.println("Hello my Name is ...") ; within the IDEs were able to produce a console output within the IDE console.

Christopher Ekeren
Christopher Ekeren
1,370 Points

I'm getting this on the workspace used in the "feeling loopy with java" workshop. I was able to run my programs fine as recently as early yesterday, but now they aren't working.

Christopher Ekeren
Christopher Ekeren
1,370 Points

Disregard, mine was a syntax error I was causing on my end lol