Run tests using the client mode JVM (or as close as we can get to it)

Took this idea from the previous commits in #954 and figured out the modern alternative