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.

Marius Brivinskas
3,277 PointsCould not load main method
Is it something wrong with the work space , as when I am trying to run the code I always get the error saying that "Could not find or load main class Introductions.java ".
I tried this code on IDE which is working fine.
Does anyone else faced this issue , and if so how you solved that
1 Answer

Steve Hunter
57,682 PointsHi Marius.
Have you saved and compiled your code?
Try this on the console: javac Introductions.java && java Introductions
Make sure you have saved your code, then try the above.
Let me know how you get on.
Steve.
Steve Hunter
57,682 PointsSteve Hunter
57,682 PointsI've forked your Workspace snapshot and it works fine here.
Marius Brivinskas
3,277 PointsMarius Brivinskas
3,277 PointsHi Steve,
Got it sorted , when running command "java Introductions" I was adding .java at the end which was causing problem.
Thanks for response