Is this strange or did I just missed something?

I can't seem to find something to fix this error, tried to rename the file, saved it on Documents then created a folder name Java under it and pasted it there still the file is either couldn't be found or had an error that says "error: Class names, 'MyClass.Java', are only accepted if annotation processing is explicitly requested 1 error" Need help regarding this one, guys!

Attachment image

1 Answer

Relevance
  • Chris
    Lv 7
    5 months ago

    As is plainly visible inside the image you posted, your file is called

    MyClass.java.java

    I suggest removing the superfluous .java extension and you ll find everything will start to work as expected.

    • Quentin
      Lv 7
      5 months agoReport

      That will be due to the habit of modern OSes hiding the extension. So you never know how many extensions a file has!

Still have questions? Get answers by asking now.