:- use_module(library(jpl)).
Fails silently if a JVM has not yet been started, and can thus be used to test for this.