Skip to content

Commit f0b0f9e

Browse files
author
emmanue1
committed
Pull request #194: add -Djd-gui.cfg=path/to.jd-gui.cfg
1 parent 3443db2 commit f0b0f9e

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

app/src/main/java/org/jd/gui/service/configuration/ConfigurationXmlPersisterProvider.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,15 @@ public class ConfigurationXmlPersisterProvider implements ConfigurationPersister
2828
protected static final File FILE = getConfigFile();
2929

3030
protected static File getConfigFile() {
31+
String configFilePath = System.getProperty(Constants.CONFIG_FILENAME);
32+
33+
if (configFilePath != null) {
34+
File configFile = new File(configFilePath);
35+
if (configFile.exists()) {
36+
return configFile;
37+
}
38+
}
39+
3140
if (PlatformService.getInstance().isLinux()) {
3241
// See: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
3342
String xdgConfigHome = System.getenv("XDG_CONFIG_HOME");

0 commit comments

Comments
 (0)