得到jar包运行时所在的目录

133 阅读1分钟

听起来要求怪异,也确实需要:

String jarDir = FileSystem.class.getProtectionDomain().getCodeSource().getLocation().getPath();