How to get the ScriptManager inside Gateway Module Java

I wouldn't try to hardcode a script name. That's an antipattern - what if you want to change the name of the script that's invoked; you need to install a new module to do so?
Instead, I would look into the extension function mechanism. You can provide an extension function with your component, invoke it when necessary from your code, and allow the end user in the designer to author whatever code they feel like.

There's some discussion on a similar problem in this thread, including some of the code required to invoke an extension function in Perspective; I'm not sure if our example module provides any samples of that: