Error and warning messages

About error and warning messages

This overview describes the kinds of errors and warnings that can occur when compiling, debugging, or running JBuilder applications.

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


Symbols in error and warning messages

Some messages include a symbol (such as a variable, file name, or module) that is taken from your program. In the following example, 'filename' would be replaced by the name of the file causing the problem:
   Error opening 'filename' for output
For 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 errors and warnings

Compile-time error messages indicate errors in program syntax or errors in accessing a disk or memory. When most compile-time errors occur, the compiler completes the current phase (parsing and code-generating) of the compilation and stops. When fatal compile-time errors happen, compilation stops immediately.

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.


Runtime errors and warnings

Runtime errors occur after the program has successfully compiled and is running. Runtime errors are usually caused by logic errors in your program code. If you receive a runtime error, you must correct your source code and recompile the program for the fix to take effect.


Debugger messages

The integrated debugger generates all IDE debugger messages and displays them in the Message pane. Many of these messages relate to options that were not set properly in the IDE integrated debugger screens.