javac error: Class names are only accepted if annotation processing is explicitly requested

后端 未结 12 778
余生分开走
余生分开走 2020-11-27 04:37

I get this error when I compile my java program:

error: Class names, \'EnumDevices\', are only accepted if annotation 
processing is explicitly requested
1          


        
12条回答
  •  迷失自我
    2020-11-27 05:21

    I was stumped by this too because I was including the .Java extension ... then I noticed the capital J.

    This will also cause the "annotation processing" error:

    javac myclass.Java 
    

    Instead, it should be:

    javac myclass.java 
    

提交回复
热议问题