Skip to content

Commit 104a37c

Browse files
committed
Have toolsUI read nj22Config.xml on startup, if found
We were looking for the config, but not loading it through the runtime parser. Fixes #1479
1 parent 94fd016 commit 104a37c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

uicdm/src/main/java/ucar/nc2/ui/ToolsUI.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,11 +1524,14 @@ public void setMessage(SocketMessage.Event event) {
15241524
}
15251525

15261526
if (!configRead) {
1527+
// if System.getProperty("user.home") is set, look under user_home/.unidata for nj22Config.xml,
1528+
// otherwise look under the relative directory .unidata
15271529
String filename = XMLStore.makeStandardFilename(".unidata", "nj22Config.xml");
15281530
File f = new File(filename);
15291531
if (f.exists()) {
15301532
try (FileInputStream fis = new FileInputStream(filename)) {
15311533
StringBuilder errlog = new StringBuilder();
1534+
RuntimeConfigParser.read(fis, errlog);
15321535
System.out.println(errlog);
15331536
} catch (IOException ioe) {
15341537
log.warn("Error reading {} = {}", filename, ioe.getMessage());

0 commit comments

Comments
 (0)