common-java-errors

common-java-errors

Class names are only accepted if annotation processing is explicitly requested

Problem

When attempting to compile I get the following error:

.. code-block:: bash

javac myfirstjavaprog error: Class names, ‘myfirstjavaprog’, are only accepted if annotation processing is explicitly requested 1 error

Solution

You forgot the .java extension on the filename, please type:

.. code-block:: bash

javac myfirstjavaprog.java