Two types of messages can occur:
The compiler generates messages as they are detected. The true cause of the error might occur one or more lines before or after the line number specified in the error message.
For a complete list of errors by number, see
"Error messages."
To locate the line of code containing the error, expand the Errors
folder and double-click the error in the structure pane. The line
containing the error is highlighted in the editor.
Error messages also appear on the Compiler tab in the message pane during compiling. Select an error message and press F1 for Help. Use the arrow keys to navigate through compiler error messages. Click an error message to highlight the code in the open file.
Symbol | Meaning |
---|---|
'argument' | A method argument. |
'classname' | A class name. |
'declaration' | A complete method or class declaration. |
'exception' | A name of an exception. |
'filename' | A file name (with or without extension). |
'interface' | An interface name. |
'labelname' | A label name. |
'member' | The name of a class variable or method. |
'message' | A message string. |
'methodname' | A method name. |
'modifier' | A modifier for a method or variable. |
'package' | A package name. |
'pathname' | An operating system path name or URL. |
'symbol' | An identifier denoting a variable, method, class, or package. |
'token' | An identifier, a keyword, or a character such as a parenthesis, brace, or semicolon. |
'type' | A type name. |
'variable' | A variable name. |
Compiler warnings indicate conditions that are suspicious, but legitimate. Warnings are issued as a result of programming errors that the compiler can handle or constructs that may yield the wrong result. Compiler warnings do not stop compilation.
You might see many warnings about deprecated methods, such as:
This means that a function from an earlier version of the JDK was replaced by a different function in a later version. You can still use the old function; it just causes warnings. You can turn all warnings off but can't selectively turn off just the deprecated warnings.Method readLine() in class java.io.DataInputStream has been deprecated