diff --git a/src/main/java/com/rarchives/ripme/utils/Utils.java b/src/main/java/com/rarchives/ripme/utils/Utils.java index 880e24e8..7cf4625b 100644 --- a/src/main/java/com/rarchives/ripme/utils/Utils.java +++ b/src/main/java/com/rarchives/ripme/utils/Utils.java @@ -222,7 +222,8 @@ public class Utils { } private static File getJarDirectory() { - return new File(System.getProperty("java.class.path")).getParentFile(); + String[] classPath = System.getProperty("java.class.path").split(";"); + return classPath.length > 1 ? new File(System.getProperty("user.dir")) : new File(classPath[0]).getParentFile(); } /**