Error messages
About error messages
#100-199
#200-299
#300-399
#400-499
#500-599
#600-699
#700-799
#800-899
- 100 - illegal character
- The indicated character is not valid at this point in the program, creating a syntax error.
- 101 - invalid escape character
- The character is not a valid Java escape sequence or Unicode character.
- 102 - malformed floating point number
- The number is either not in a valid floating-point format or not in valid scientific 'E' notation.
- 103 - malformed integer number
- The number is not a valid integer.
- 104 - integer number too large
- The number has exceeded the value for a byte, short, int, or long type integer.
- 105 - unclosed comment
- Comments that begin with either the /* or /** character sequence must eventually close with a */ sequence.
- 106 - unclosed character or string literal
- Character literals must begin and end with a single-quote (') character.
- String literals must begin and end with a double-quote (") character.
- 107 - no escape character allowed here
- Escape characters are not valid at this point in the program, creating a syntax error.
- 200 - 'token' expected
- The given token was expected at this point in the program.
- 201 - '(' or '[' expected
- An opening parentheses or bracket was expected at this point in the program.
- 202 - 'class' or 'interface' expected
- The keywords class or interface were expected and not found at this point in the program.
- 203 - illegal start of type
- A type identifier was expected and not found at this point in the program.
- 204 - illegal start of expression
- An expression starts with an illegal token.
- 205 - malformed declaration
- The syntax of a declaration is invalid.
- 206 - malformed expression
- The syntax of an expression is invalid.
- 207 - not a statement
- The compiler could not recognize this code as a valid statement.
- 208 - repeated modifier
- A method or variable modifier is being repeated within the same declaration.
- 209 - 'try' without 'catch' or 'finally'
- A try statement must also include either a catch or finally clause.
- 210 - 'else' without 'if'
- An else statement was encountered without an associated if statement.
- 211 - 'finally' without 'try'
- A finally statement was encountered without an associated try statement.
- 212 - 'catch' without 'try'
- A catch statement was encountered without an associated try statement.
- 213 - orphaned 'token'
- A keyword was found out of its usual context such as a case or default clause outside a switch statement.
- 214 - missing initializer
- final variables must be initialized at the time of their declaration.
- 215 - invalid method declaration; return type required
- The return type of a method must be declared. For example:
public int myMethod(int paramOne)
- 216 - illegal combination of modifiers: 'modifier' and 'modifier'
- An inconsistent combination of modifiers is being used such as defining a method as both abstract and final.
- 217 - modifier 'modifier' not allowed here
- The given modifier cannot be used in this context. A variable cannot be native or synchronized, for example.
- 218 - obsolete syntax: '{' now required here
- [text forthcoming]
- 219 - obsolete syntax: `private protected' no longer supported, assuming `protected' instead
-
- 300 - 'symbol' not found
- The given symbol is referenced but not declared.
- 301 - no constructor matching 'declaration' found in 'classname'
- The arguments passed while instantiating a class do not match any defined constructor of that class.
- 302 - cannot access 'classname'; 'reason'
- The file for the given class cannot be accessed for the given reason.
- 303 - undefined variable: 'this' or 'super'
- The variables this or super are not defined in a static context.
- 304 - reference to 'symbol' is ambiguous; both 'symbol' and 'symbol' match
- The compiler could not resolve the given symbol. This might be due to a naming conflict with a symbol that appears in more than one interface, class, or package.
- 305 - ambiguous class reference: 'classname', 'classname'
- The compiler could not resolve the class mentioned in this error message. This might be due to a naming conflict with a class that appears in more than one package. Try referencing the class with a full qualifier such as the following:
java.awt.color
- 306 - 'symbol' has private or protected access
- The given symbol cannot be accessed, because it has private or protected access.
- 307 - 'symbol' is not public; cannot be accessed from outside package
- The given symbol must be declared public to be accessed here.
- 308 - non-static 'member' cannot be referenced from a static context
- Static (or class) variables and methods are shared across all instances of a class. 'Member' is either a non-static (or class) variable or a method being used as if it were a static. Either declare the member as static, or change its modifier so that it can be accessed from the current member.
- 309 - cannot access 'member' before superclass constructor has been called
- Child classes without explicit calls to the parent constructor receive an implied parent constructor call of the following form: super(). Other parent constructors will not be called unless specifically invoked. An attempt is being made to access a class member prior to a required parent constructor call.
- 310 - cannot reference this or super before superclass constructor has been called
- Child classes without explicit calls to the parent constructor receive an implied parent constructor call of the following form: super(). Other parent constructors will not be called unless specifically invoked. this or super is being referenced prior to a required parent constructor call.
- 350 - 'member' is declared final; cannot be assigned
- A variable declared as final is being assigned a value. final variables cannot change values after declaration.
- 351 - can't inherit from final 'classname'
- A final class cannot be subclassed.
- 352 - abstract 'method name' cannot be accessed directly
- An abstract method cannot be called. The class declaring the method must be subclassed, and the method must be defined.
- 353 - 'classname' is abstract; cannot be instantiated
- Classes that have been defined with the abstract modifier cannot be instantiated. The abstract class must be subclassed at which point the child class can be instantiated.
- 354 - incompatible types; found: 'type', required: 'type'
- The found type is not compatible with the required type.
- 355 - possible loss of precision: %1, required: %2
- [text forthcoming]
- 356 - incompatible return type; found: %1, required: %2
-
- 357 - incompatible throws list; found: %1, required: %2
-
- 358 - 'void' type not allowed here
- The type void is used where it is not allowed, such as in the declaration of the element type of an array.
- 359 - object type required, but 'type' found
- The required type must be a reference type, i.e. a class type (Object, or derived from it), an array type, or null type, but not a primitive type like int or char.
- 360 - unreported exception: 'exception'; must be caught or declared to be thrown
- The current method is throwing an exception which is not caught and which has not been declared to be thrown.
- 361 - 'identifier kind' required, but 'identifier kind' found
- The given kind of identifier is required, but another kind was found.
- 362 - cyclic inheritance involving 'classname'
- Two classes reference each other as the parent class.
- 362 - cyclic `this' constructor calls involving %1
- Two classes reference each other as the parent class.
- 363 - null cannot be dereferenced
- The null literal does not reference any object and hence cannot be dereferenced.
- 364 - cannot cast 'type' to 'type'
- Casting cannot be done between primitive types and reference types, or between boolean and non-boolean, or between reference types of different branches of the class hierarchy. Refer to the Java Language Specification (§5.4).
- 365 - cannot compare 'type' with 'type'
- You attempted a comparison between incompatible types. Refer to the Java Language Specification.
- 400 - undefined label: 'labelname'
- You tried to reference a program label which has not been defined.
- 401 - break outside of loop or switch
- A break statement can be used only within the context of a loop or switch statement.
- 402 - continue outside of loop
- You can only use a continue statement within the context of a loop statement.
- 403 - not a loop label: 'label'
- A break or continue statement is referencing a label 'identifier' that does not mark a reachable loop statement.
- 404 - can't return a value from method whose result type is void
- You attempted to return a value from a void method, but a method whose return type is void cannot return values.
- 405 - missing return value
- Functions not declared as void must return a value by using the return statement.
- 406 - static initializer cannot return
- Static initializers cannot contain a return statement.
- 407 - duplicate case label
- Identical case labels were encountered within a switch statement.
- 408 - duplicate default label
- More than one default label was encountered in a switch statement.
- 409 - constant expression required
- The expression that this message points to requires a constant value but it contains a variable element.
- 410 - duplicate label: %1
- [text forthcoming]
- 450 - duplicate definition of 'symbol'
- Symbols must be unique within their scope.
- 451 - duplicate definition of class 'classname'
- You have two classes using the same name, but class names must be unique within their scope.
- 452 - no interface allowed here
- A class cannot extend an interface, but a class only.
- 453 - not an interface
- A class can only implement an interface, not a class.
- 454 - 'classname' should be declared abstract; it does not define 'member'
- One or more member functions of this class have no function body. Either declare the class as an abstract class or define the member function body.
- 455 - 'method' cannot be overridden
- A method has been declared as 'final' or 'static', and cannot be subclassed.
- 456 - static 'method' cannot override 'method'
- A method defined with the keyword static cannot override other methods.
- 457 - static 'method' cannot implement 'method'
- A static method cannot implement an interface method.
- 458 - cannot override 'method' with weaker access privileges, was 'modifier'
- A subclass or class member is being redefined with weaker access privileges than the member had in its parent class.
- 459 - cannot implement 'method' with weaker access privileges, was 'modifier'
- In the implementation of a method declared in either an abstract class or an interface, the actual implementation must use the same access modifiers (that is, private, protected, or public) as in the original declaration.
- 460 - cannot override 'method' with different return type, was 'type'
- To override a method, the new method must have the same return type as the original method.
- 461 - cannot implement 'method' with different return type, was 'type'
- When implementing a method that was declared in either an abstract class or an interface, you must use the same return type as in the original declaration.
- 462 - overridden 'method' does not throw 'exception'
- An overriding method may not be declared to throw more checked exceptions than the overridden method.
- 463 - implemented 'method' does not throw 'exception'
- A method implementing an interface method may not be declared to throw more checked exceptions than the interface method.
- 464 - missing function body, or declare as abstract
- A method of this class has no function body. Either declare the method as abstract or define the method body.
- 465 - 'method' cannot have body
- Abstract methods and methods declared in an abstract class or in an interface cannot have a body.
- 466 - method does not return a value
- Methods whose return type is not void must return a value by using the return statement.
- 467 - double import: 'package'
- A package is being imported more than once into a compilation unit.
- 468 - not a package: 'package'
- The given name is used as a package, but is not the name of a package.
- 469 - %1 is already defined
- A local variable cannot shadow another local variable with the same name in an enclosing scope.
- 470 - final variable needs an initializer
- Variables declared final must be initialized at the time of their declaration.
- 471 - class %1 clashes with imported %2
- [text forthcoming]
- 472 - %1 repeated
- Repeated inheritance.
- 473 - %1 is a package; cannot be imported
-
- 474 - package and class have same name: %1
-
- 500 - cannot compute value of expression: 'expression'
- A constant expression cannot be evaluated because an arithmetic exception is raised.
- 550 - statement is unreachable
- This statement will never be executed.
- 551 - catch is unreachable
- [text forthcoming]
- 552 - illegal forward reference
- Referenced variables in initializers must be declared and initialized before you can use them.
- 553 - variable might not have been initialized
- Each local variable must have a definitely assigned value when any access of its value occurs. See chapter 16 of the Java Language Specification.
- 600 - Reserved for future use
-
- 700 - can't read: 'filename'
- The file is not accessible. This could be caused by a file system error.
- 701 - error writing 'classname'
- The file cannot be written. The disk could be full, or there could be a file system error.
- 702 - error importing 'classname'
- The class cannot be imported. This could be caused by a bad format.
- 703 - error reading directory: 'pathname'
- The compiler cannot read from 'pathname'. This could be caused by a file system error or an access problem.
- 704 - cannot access directory 'pathname'
- Classes from the given directory cannot be included, because the directory is not accessible.
- 705 - missing output directory: 'pathname'
- [text forthcoming]
- 750 - initialization error: %1
- The compiler could not be initialized properly, because some classes could not be loaded.
- 800 - not a valid line for an expression
- An expression can only be evaluated in a valid context.
- 801 - expression cannot be evaluated
- There is an error in the expression to be evaluated.
- 802 - not supported: remote method calls
- Remote method calls are not supported.