Other Reasons It Might Not Work

Here are some other things that might go wrong even if the PATH is set correctly:

Make sure you are in the right directory; type ls and check that the file CreeperTest.java is right there.

Make sure you’re typing javac CreeperTest.java (with the .java part). Otherwise you might see a truly confusing error message like this one:

 
error: Class names, 'CreeperTest', are only accepted if
 
annotation processing is explicitly requested

If the javac command reports some kind of “syntax” or “not found” or “not defined” error, that means it doesn’t understand the text in the CreeperTest.java file, so you may have mistyped something. These kinds of errors might look something like this:

 
CreeperTest.java:1: class, ...

Get Learn to Program with Minecraft Plugins, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.