The JAVA-CALLABLE directive does not take any arguments, and so you must remove any that have been specified preceding the directive name.
      $set sourceformat(variable)
       >>JAVA-CALLABLE ON  *> remove the ON argument
       PROGRAM-ID. "demo2" .
       WORKING-STORAGE SECTION.
       ...