rollback code change

add JRE headless back since we need it, the JDK will be deleted in cleanup phrase.