Compiler Error J0253

Cannot have #define/#undef after source

The compiler detected a #define or #undef conditional compilation directive after other Java source code. The #define and #undef directives must be placed before other Java source code (except for other conditional compilation directives and source comments). Move the #define or #undef directive indicated by the error to the front of all Java source code in the file and compile again.

The following example illustrates this error:

package boxes;

#define DEBUG 
//error: '#define' must occur before the 'package' statement

public class Simple{
}