Support Java agents & dont crash when a jar is found