diff --git a/app/src/main/groovy/org/jd/gui/service/extension/ExtensionService.groovy b/app/src/main/groovy/org/jd/gui/service/extension/ExtensionService.groovy index fa55a26d..8076da35 100644 --- a/app/src/main/groovy/org/jd/gui/service/extension/ExtensionService.groovy +++ b/app/src/main/groovy/org/jd/gui/service/extension/ExtensionService.groovy @@ -13,7 +13,9 @@ class ExtensionService { protected ClassLoader extensionClassLoader = initClassLoader() protected ClassLoader initClassLoader() { - def extDirectory = new File("ext"); + def jarUri = ExtensionService.class.protectionDomain.codeSource.location.toURI() + def baseDirectory = new File(jarUri).parent + def extDirectory = new File(baseDirectory, 'ext') if (extDirectory.exists() && extDirectory.isDirectory()) { List urls = [] diff --git a/build.gradle b/build.gradle index 4d9e65bc..1d447963 100644 --- a/build.gradle +++ b/build.gradle @@ -172,8 +172,8 @@ ospackage { } from 'LICENSE', 'NOTICE', 'README.md' - postInstall 'cd /opt/'+ project.name+'; ln -s ./jd-gui-'+project.version+'.jar ./jd-gui.jar; xdg-icon-resource install --size 128 --novendor ./jd_icon_128.png jd-gui ; xdg-desktop-menu install ./*.desktop' - preUninstall 'cd /opt/'+ project.name+'; rm -f ./jd-gui.jar; xdg-desktop-menu uninstall ./*.desktop' + postInstall 'cd /opt/'+ project.name+'; ln -s ./jd-gui-'+project.version+'.jar ./jd-gui.jar; xdg-icon-resource install --size 128 --novendor ./jd_icon_128.png jd-gui; xdg-desktop-menu install ./*.desktop' + preUninstall 'cd /opt/'+ project.name+'; rm -f ./jd-gui.jar; rm -fr ./ext; xdg-desktop-menu uninstall ./*.desktop' } installOsxDist.dependsOn jar, copyAndReplaceVariablesInInfoPlist