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

Zeljko Porobija
Zeljko Porobija
11,491 Points

The class not found

When I type java Introductions I get this message: Error, could not find or load main class Introductions.

2 Answers

Hi there,

Is this when you are trying to run your code? Have you compiled your code first with javac Introductions.java?

Let me know where this problem is arising and I'll try to help out! :smile:

Steve.

Zeljko Porobija
Zeljko Porobija
11,491 Points

Well, I've managed it somehow. I did not know that when one makes a typo and runs java command, s/he should go through javac procedure again. Now I'm richer for one experience. :-D Thanks for your fast reaction, I'll try not to bother anyone again...

Hey - you're not bothering anyone!! Ask away - that's the best part about learning with Treehouse; there's always someone around to help! Use the forums: they'll help you out a lot.

With your code, if you have made any adjustments to the java code, you need to run the compile command, javac filename.java, then you can run the code with java filename. There is a way of doing that on one line, but I'll let Craig teach you that at the right moment.

Good luck wth your coding - and ask in the forum if anything is confusing you.

Steve.