Both in UST C/C++ support and Python agent, LTTNG_HOME can be used to
override HOME for lttng-ust. Ensure the Java agent has the same
behavior.
Fixes: #881
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
}
private static String getHomePath() {
- return System.getProperty("user.home");
+ /*
+ * The environment variable LTTNG_HOME overrides HOME if
+ * defined.
+ */
+ String homePath = System.getenv("LTTNG_HOME");
+
+ if (homePath == null) {
+ homePath = System.getProperty("user.home");
+ }
+ return homePath;
}
/**