46 if (Objects.nonNull(Places.getUserDirectory()) && Places.getUserDirectory().getAbsolutePath().endsWith(
"testuserdir")) {
47 LOGGER.log(Level.INFO,
"Application Data (test mode) Path: " + Places.getUserDirectory().getAbsolutePath());
48 return Places.getUserDirectory().getAbsolutePath();
52 String localDataStr = System.getenv(
"LOCALAPPDATA");
53 if (StringUtils.isNotBlank(localDataStr)) {
56 Files.createDirectories(localAppPath);
57 LOGGER.log(Level.INFO,
"Application Data Path: " + localAppPath.toString());
58 return localAppPath.toString();
59 }
catch (IOException ex) {
60 LOGGER.log(Level.SEVERE,
"IO Error using " + localAppPath.toString(), ex);
66 String homePathStr = System.getenv(
"HOME");
67 if (StringUtils.isNotBlank(homePathStr)) {
70 Files.createDirectories(localAppPath);
71 LOGGER.log(Level.INFO,
"Non-windows Application Data Path: " + localAppPath.toString());
72 return localAppPath.toString();
73 }
catch (IOException ex) {
74 LOGGER.log(Level.SEVERE,
"IO Error using " + localAppPath.toString(), ex);
80 return Places.getUserDirectory().getAbsolutePath();