Win a copy of OCP Java SE 8 Programmer II Exam Study Guide this week in the OCP forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Error: Could not find or load main class TueTest  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i have two classes in the same folder,




when i try to run TueTest it's giving this error 'Error: Could not find or load main class TueTest'
 
Ranch Hand
Posts: 568
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, welcome to coderanch.
Please tell how are you running the TueTest?
Have you created the classes independently or under a single .java file?
 
Marshal
Posts: 58421
178
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome again.

The class isn't called TueTest. It is called code.TueTest. Navigate to one level above the code directory, so if you use the ls (*nix) or dir (Windows®) command you can see code. Then
java code.TueTest
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!