First, please note that this facility doesn't always do what people want. There are many restrictions - things you can do in your stylesheet that prevent it being compilable. And many people have performance expectations that aren't met when they use this feature. In Saxon 9.4, therefore, we withdrew it entirely.
When running a compiled stylesheet, the biggest limitation is that it can't share a Configuration with anything else - it has to run standalone. That's a consequence of the way the NamePool works. So if you try to do this from the Java API, it's your responsibility to get it right.
The key to loading a compiled stylesheet is the static method
PreparedStylesheet.loadCompiledStylesheet()
This can't be done using JAXP interfaces. It returns a PreparedStylesheet object, however, which is Saxon's implementation of the JAXP Templates object, and once you've got this, you can use JAXP interfaces to create a Transformer and run a transformation.