Take the 2-minute tour ×

Quoting, Sun's Official Java Tutorial

Class names, 'HelloWorldApp', are only accepted if annotation processing is explicitly requested

What does it mean? And how to apply it?

share|improve this question

3 Answers 3

up vote 10 down vote accepted

"Annotation Processing" is a hook into the compile process of the java compiler, to analyse the source code for user defined annotations and handle then (by producing compiler errors, compiler warning, emmiting source code, byte code ...).


share|improve this answer

From the very next line of the page that you refer to:


If you receive this error, you forgot to include the .java suffix when compiling the program. Remember, the command is javac HelloWorldApp.java not javac HelloWorldApp.

That is, the string that you are referring to is a possible error that you might get when trying to compile the examples. The very next line in the document, tells you how to resolve the issue.

If you want to know more about annotations, what they are, and how to use them, then I would suggest to go through the Annotations tutorial.

share|improve this answer
Question: "What is annotation processing in Java?" –  Daniel Earwicker Jan 27 '10 at 10:55
@Earwicker: That is the title of the question, now read the text of the question: this page says blah, what does that mean? –  Paul Wagland Jan 27 '10 at 10:58
Yeah, I read it. It doesn't say the OP has hit any kind of compile error they can't fix. It says (again) they want to know what annotation processing is. –  Daniel Earwicker Jan 27 '10 at 11:02
@Earwicker: I have updated my answer to answer both interpretations of the question. –  Paul Wagland Jan 27 '10 at 11:34

This error is due to incorrect use of java compilation command i.e javac with file name w/o java extension (.java)

Use proper compilation command

javac HelloWorldApp.java

Command used foe execution

java HelloWorldApp

share|improve this answer

Your Answer


