mirror of
https://github.com/angryip/ipscan.git
synced 2025-10-26 11:18:17 +00:00
simplify version getting code (and fix IDEA warning)
This commit is contained in:
parent
0dc99442d5
commit
4dd7bd45f9
@ -58,7 +58,7 @@ public class Version {
|
||||
}
|
||||
|
||||
private static void loadVersionFromJar() {
|
||||
String path = Version.class.getClassLoader().getResource(Version.class.getName().replace('.', '/') + ".class").toString();
|
||||
String path = Version.class.getProtectionDomain().getCodeSource().getLocation().toString();
|
||||
if (path.startsWith("jar:file:")) {
|
||||
path = path.substring(4, path.indexOf('!'));
|
||||
try {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user