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.
Error messages appear in the Message pane. To view context-sensitive help for a message, select the message, press F1, and scroll down to the number of the message you're interested in.
See also:
Error messages
Error opening 'filename' for outputFor example:
Error opening foo.java for output
Error and warning messages can contain the following symbols.
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:
Method readLine() in class java.io.DataInputStream has been deprecated.
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.