We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3dfc2c8 commit 619714bCopy full SHA for 619714b
jcp/src/main/java/com/igormaznitsa/jcp/JcpPreprocessor.java
@@ -151,8 +151,9 @@ private static File getBaseDir() {
151
if (baseDirInProperties == null) {
152
File result;
153
try {
154
- result = new File(
+ final File jarFile = new File(
155
JcpPreprocessor.class.getProtectionDomain().getCodeSource().getLocation().toURI());
156
+ result = jarFile.isDirectory() ? jarFile : jarFile.getParentFile();
157
} catch (Exception ex) {
158
result = new File("");
159
}
0 commit comments