@Override
    public void simpleUpdate(float tpf) {
        if (REALTIME_BAKING) {
            lastBake += tpf;
            if (lastBake > 1.4f) {
                rootNode.getControl(EnvironmentProbeControl.class).rebake();
                lastBake = 0;
            }
        }
    }
A simpler PBR example that uses EnvironmentProbeControl to bake the environment
jme3-examples/src/main/java/jme3test/light/pbr/TestPBRSimple.java