Stub cancellation on the JVM.