Allow running the jar file directly, broke when upgrading to gradle.