Error List

Error List for the ‘JAVA-Compiler’ Category

javac' is not recognized

Applies to:
Windows

Description:
“javac.exe” executable cannot be found in path

Cause:
a. JDK is not installed
b. The jre entry PATH variable is not set to the path of Java Development Kit (JDK)

admin JAVA-Compiler

EOFException

Applies to:
Weblogic 8.1 server
MySQL server

Description:
Warns that the end of file or stream has been unexpectedly reached during input or end-of-file is reached before the desired number of bytes has been read..

Cause:
a. Attempt to send message on closed socket
b. The stream has been closed

admin JAVA-Compiler

IllegalArgumentException

Applies to:
Java 2 Platform SE v1.4.2
Java 2 Platform SE 5.0

Description:
Indicates that a method passes an illegal or appropriate environment

Cause:
a. Invalid arguments are passed
b. Servlet mapping specifies an unknown servlet name SomeServletName
c. Filter mapping specifies an unknown filter name SomeFilterName

admin JAVA-Compiler

Class or interface declaration expected

Applies to:
NA

Description:
This is a syntax error and occurs when keywords such as “class” or “int” are not found by the compiler or when there is code outside of a class declaration.

Cause:
a. Keywords are capitalized
b. Objects are declared at the start of the class and were mistakenly placed before the class has started.
Example:
String test = new String();
public class TestError
{
// Your code here
}


admin JAVA-Compiler

; expected

Applies to:
NA

Description:
This is a syntax error and occurs when assignments in Java are not properly terminated with a semicolon (;)

Cause:
a. Common error is values of great length such as long strings are written over a new line
b. Redeclaring a variable inside a loop
for (int i=0;i double totalx+=x[i].carea();
}

admin JAVA-Compiler

Invalid expression statement

Applies to:
NA

Description:
This is a syntax error that does not conform to the Java language

Cause:
a. Brackets are not placed after the name of method used
b. Java keyword is not used appropriately:
boolean double = true;

admin JAVA-Compiler

Class yy not found in type declaration

Applies to:
NA

Description:
This is a syntax error and occurs when you miss either of the following:
a. Forget to import a package
b. Commits case-sensitive errors with classes and mistype them

Cause:
a. Required “import” statements of your native code are not properly placed at the beginning of the program
b. Data types like “String” is written as string rather than String

admin JAVA-Compiler

Method yy not found in class zz

Applies to:
NA

Description:
This is a syntax error and occurs when the method you are trying to call does not exist

Cause:
a. Static methods messages are sent to objects rather than classes.
b. The method you are trying to access does not exist.
c. A constructor is called in a constructor with the same name
d. Typographical error
System.out.prinln(“My Test”);

admin JAVA-Compiler

Undefined variable

Applies to:
NA

Description:
This is a syntax error and occurs when you commit case-sensitive errors with variables

Cause:
a. Standard typographical error or capitalized letters issue
b. The variable might be declared in the wrong block of code

admin JAVA-Compiler

Undefined variable or class name

Applies to:
NA

Description:
This is a syntax error that is similar to “Undefined variable” error, the compiler here is uncertain if a class or variable is being referred

Cause:
a. Standard typographical error or capitalized letters issue
b. The variable might be declared in the wrong block of code

admin JAVA-Compiler