dcsimg
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


advertisement
 

Using Error: Class Names and YourClassName

Language: Java, Expertise: Beginner - Using error: Class names or 'YourClassName' is only accepted if annotation processing is explicitly requested.


advertisement

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Using error: Class names, 'YourClassName', is only accepted if annotation processing is explicitly requested.

There are likely instances that you have come across this error and found it very difficult to understand what is happening.

Even experienced engineers face such issues and are unable to move on. This sometimes happens when you are not using your IDE for work.



The reason why this error occurs is really simple.

The reason is that you are trying to use the javac command with a file name without the java extension.

For example:

javac YourClassName - This command will result in the above error. By mistake, you have used javac to execute.

Correct way of using the commands:

-----------------------------------------------------------
javac YourClassName.java - This is the correct way of using this command to compile. 
java YourClassName - This is the correct way of using this commad to execute.


   
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Thanks for your registration, follow us on our social networks to keep up-to-date