How to make a new mode for autocompletion work

I am attempting to create a mode for the autocompletion extension that works with Java code to use in activecode windows in online textbooks. I have made a file that defines the mode and includes a keyword bank to use for autocompletion, but whenever cm.getMode() runs to get the mode of an activecode window using Java it always returns clike as the mode. Do I need to import my new mode file into the directory I am trying to use the autocomplete in? I have tried looking through the code to understand what I am missing with no luck and would appreciate some advice.

The Java mode is implemented using the generic clike mode, so is expected to hold "clike" when the Java mode is active.