mirror of
https://github.com/alibaba/arthas.git
synced 2026-10-21 12:32:38 +00:00
when using jdk7, use http to download to avoid SSL Exception. fix #349
This commit is contained in:
@@ -225,9 +225,10 @@ public class Bootstrap {
|
||||
System.exit(0);
|
||||
}
|
||||
|
||||
if (JavaVersionUtils.isJava6()) {
|
||||
if (JavaVersionUtils.isJava6() || JavaVersionUtils.isJava7()) {
|
||||
bootStrap.setuseHttp(true);
|
||||
AnsiLog.debug("Java version is 1.6, only support http, set useHttp to true.");
|
||||
AnsiLog.debug("Java version is {}, only support http, set useHttp to true.",
|
||||
System.getProperty("java.specification.version"));
|
||||
}
|
||||
|
||||
// check telnet/http port
|
||||
|
||||
@@ -6,11 +6,12 @@ package com.taobao.arthas.common;
|
||||
*
|
||||
*/
|
||||
public class JavaVersionUtils {
|
||||
public static void main(String[] args) {
|
||||
System.err.println(JavaVersionUtils.isJava8());
|
||||
}
|
||||
private static final String javaVersionStr = System.getProperty("java.specification.version");
|
||||
private static final float javaVersion = Float.parseFloat(javaVersionStr);
|
||||
|
||||
private static final float javaVersion = Float.parseFloat(System.getProperty("java.specification.version"));
|
||||
public static String javaVersionStr() {
|
||||
return javaVersionStr;
|
||||
}
|
||||
|
||||
public static float javaVersion() {
|
||||
return javaVersion;
|
||||
|
||||
Reference in New Issue
Block a user