提交 785a0548 编写于 作者: K Kuai Wei 提交者: 云矅

[Misc] Add distro name in java version string

Summary: add distro name and version in java version string

Reviewers: 传胜

Subscribers: 麦庶

Differential Revision: https://aone.alibaba-inc.com/code/D796935
上级 226051a0
......@@ -41,6 +41,8 @@ $(PROFILE_VERSION_JAVA_TARGETS): \
-e 's/@@java_runtime_version@@/$(FULL_VERSION)/g' \
-e 's/@@java_runtime_name@@/$(RUNTIME_NAME)/g' \
-e 's/@@java_profile_name@@/$(call profile_version_name, $@)/g' \
-e 's/@@java_distro_name@@/$(DISTRO_NAME)/g' \
-e 's/@@java_distro_version@@/$(DISTRO_VERSION)/g' \
$< > $@.tmp
$(MV) $@.tmp $@
......
......@@ -44,6 +44,12 @@ public class Version {
private static final String java_runtime_version =
"@@java_runtime_version@@";
private static final String java_distro_name =
"@@java_distro_name@@";
private static final String java_distro_version =
"@@java_distro_version@@";
static {
init();
}
......@@ -103,7 +109,9 @@ public class Version {
/* Second line: runtime version (ie, libraries). */
ps.print(java_runtime_name + " (build " + java_runtime_version);
ps.print(java_runtime_name +
" (" + java_distro_name + " " + java_distro_version + ")" +
" (build " + java_runtime_version);
if (java_profile_name.length() > 0) {
// profile name
......@@ -120,7 +128,9 @@ public class Version {
String java_vm_name = System.getProperty("java.vm.name");
String java_vm_version = System.getProperty("java.vm.version");
String java_vm_info = System.getProperty("java.vm.info");
ps.println(java_vm_name + " (build " + java_vm_version + ", " +
ps.println(java_vm_name +
" (" + java_distro_name + " " + java_distro_version + ")" +
" (build " + java_vm_version + ", " +
java_vm_info + ")");
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册