O'Reilly logo

Learn to Program with Minecraft Plugins, 2nd Edition by Andy Hunt

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Java-Compiler Error Messages

Java-compiler error messages usually look something like this:

 
src/helloworld/HelloWorld.java:21: cannot find symbol
 
symbol : ​class​ MessageReceiver
 
location: ​class​ helloworld.HelloWorld
 
public​ ​void​ helloCommand(MessageReceiver caller, ​String​​[]​ parameters)

Java is trying to tell you exactly where the error occurred and what it thinks the problem is.

The first bit of text is the name of the file where Java thinks the problem is located—in this case, the file src/helloworld/HelloWorld.java. Next is a number in between colons—that’s the line number in the file (21 here). Next is the error message itself, “cannot find symbol.” After that come the details specific to this error message, which in this ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required