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.

For a complete list of errors by number, see "Error messages."


Syntax errors and error messages

Syntax errors are errors that violate the syntactical rules of the Java programming language. The editor catches these errors as they occur, before you compile. Syntax errors are displayed in a folder at the top of the structure pane.

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.

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:

For example:

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 debugger in the message pane. Many of these messages relate to options that were not set properly in the IDE integrated debugger screens.