• Post Reply Bookmark Topic Watch Topic
  • New Topic

Trouble executing my code  RSS feed

 
John Orpert
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am having trouble executing my code. I have the file and I know how to compile it so that it creates a  (filename).class file but when I try to run the class file, it gives me this: Error: Could not find or load main class myClass.java. Sometimes it even gives me this: error: Class names, 'myClass', are only accepted if annotation processing is explicitly requested 1 error. I have experience with other programming languages such as python and C++ but I cant figure this out, I was hoping someone would help me out. Thanks in advance!
 
John Orpert
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have resolved this without resolving it. It seems that it was executing the code but it was showing up in a place that was hard to see and it was together with the the directory and no spaces. I have officially lost my mind ;_;/ Ill be back for more questions if something comes up!
 
Campbell Ritchie
Marshal
Posts: 56584
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch

Lots of people do things like that, so don't worry about it. That sort of error might have to do with
  • 1: Putting the files somewhere other than where you think they are.
  • 2: Tiny spellling errors in the main method's heading.
  • 3: Whether you say ClassName or ClassName.java which can be confusing.
  • Have you looked behind the sofa for your mind?
     
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!