mirror of
https://github.com/alibaba/arthas.git
synced 2024-04-21 10:21:39 +00:00
print ARTHAS_LIB_DIR and JAVA_HOME. #2289
This commit is contained in:
@@ -85,6 +85,8 @@ ARTHAS_HOME=
|
||||
# define arthas's lib
|
||||
if [ -z "${ARTHAS_LIB_DIR}" ]; then
|
||||
ARTHAS_LIB_DIR=${HOME}/.arthas/lib
|
||||
else
|
||||
echo "[INFO] ARTHAS_LIB_DIR: ${ARTHAS_LIB_DIR}"
|
||||
fi
|
||||
|
||||
# target process id to attach
|
||||
|
||||
@@ -135,6 +135,7 @@ public class Bootstrap {
|
||||
String arthasLibDirEnv = System.getenv("ARTHAS_LIB_DIR");
|
||||
if (arthasLibDirEnv != null) {
|
||||
ARTHAS_LIB_DIR = new File(arthasLibDirEnv);
|
||||
AnsiLog.info("ARTHAS_LIB_DIR: " + arthasLibDirEnv);
|
||||
} else {
|
||||
ARTHAS_LIB_DIR = new File(
|
||||
System.getProperty("user.home") + File.separator + ".arthas" + File.separator + "lib");
|
||||
@@ -311,6 +312,10 @@ public class Bootstrap {
|
||||
public static void main(String[] args) throws ParserConfigurationException, SAXException, IOException,
|
||||
ClassNotFoundException, NoSuchMethodException, SecurityException, IllegalAccessException,
|
||||
IllegalArgumentException, InvocationTargetException {
|
||||
String javaHome = System.getProperty("java.home");
|
||||
if (javaHome != null) {
|
||||
AnsiLog.info("JAVA_HOME: " + javaHome);
|
||||
}
|
||||
Package bootstrapPackage = Bootstrap.class.getPackage();
|
||||
if (bootstrapPackage != null) {
|
||||
String arthasBootVersion = bootstrapPackage.getImplementationVersion();
|
||||
|
||||
Reference in New Issue
Block a user