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 trialTevž Ivanjko
1,774 PointsWhen i try to run Hangman in java i get an error: Could not find or load main class Hangman. Anyone know the solution?
I think i do the comands right because i did them a multiple times just to check. I just don't know what i do wrong i had it in the previous workspace as well but i thought it was just a bug on that one.
1 Answer
Monde Ngalonkulu
12,050 PointsCan we see your code? And what's your class name?
Things to check are:
- That you class definition is public
public class Hangman
- That its filename is
Hangman.java
- And your main method signature is public static
public static void main(String[] args)