COBCH1848 ILMAIN directive ignored - static main method found with string array parameter

The program contains a static method named ‘main’ that uses a single parameter that is also a string array. When compiling for JVM, this causes the ILMAIN directive to be ignored.

Resolution:

Correct the code; then recompile.

Example:

In the following example, the main static method uses a single parameter that is a string array; therefore, the ILMAIN directive is ignored when compiling for JVM.

      $set ilmain(Hello)
       class-id Err1848.
       method-id Hello static.
           display "In Hello method"
       end method.
       method-id main static (args as string occurs any).
           display "In main method"
       end method.
       end class.