• Post Reply Bookmark Topic Watch Topic
  • New Topic

Head first java excercise problem: Could not find main class  RSS feed

 
Sami Devine
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi I am new to the forum and new to Java. This is in all likelihood a very dumb question. Please bear with me.

I am going through Head first Java. Following is the code of an excercise problem. I have A.java and Mixed2.java





For javac A.java there is no error
But for java Mixed2, I get the following error "Could not find the main class:Mixed 2"
Please help
 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But for java Mixed2, I get the following error "Could not find the main class:Mixed 2"

Did you compile the Mixed2 class ? (javac, not java)
 
Sami Devine
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Christophe, Thanks this worked.
 
Campbell Ritchie
Marshal
Posts: 55759
163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
Sami Devine
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!