Fixed resource loading to also work for packaged jars.