java获取vm运行参数_如何获取在Java中运行Java VM的名称?

news/2024/5/19 4:01:03 标签: java, jvm, 反射, mybatis, spring

java获取vm运行参数

To get the name of running VM (Virtual Machine) in Java, we use the getProperties() method, which is defined in System class, while calling the method, we need to pass the property name to get the name of running Java VM.

获取Java中正在运行的VM(虚拟机)的名称 ,我们使用System类中定义的getProperties()方法 ,在调用该方法时,我们需要传递属性名称以获取正在运行的Java VM的名称。

The property to get the name of running Java VM is: "java.vm.name"

获取正在运行的Java VM的名称的属性是: java.vm.name”

The method call is: System.getProperties("java.vm.name");

方法调用为: System.getProperties(“ java.vm.name”);

Java code to get and print the name of running Java VM

Java代码获取并打印正在运行的Java VM的名称

// Java program to demonstrate the example of 
// getProperties() method of System Class

import java.lang.*;
import java.util.Properties;

public class Main {
    public static void main(String[] args) {
        String vm_name = null;
        vm_name = System.getProperty("java.vm.name");
        System.out.println("Running Java vm is: " + vm_name);
    }
}

Output

输出量

Running Java vm is: Java HotSpot(TM) 64-Bit Server VM


翻译自: https://www.includehelp.com/java/how-to-get-the-name-of-running-java-vm-in-java.aspx

java获取vm运行参数


http://www.niftyadmin.cn/n/1255608.html

相关文章

weakhashmap_Java WeakHashMap containsKey()方法与示例

weakhashmapWeakHashMap类containsKey()方法 (WeakHashMap Class containsKey() method) containsKey() method is available in java.util package. containsKey()方法在java.util包中可用。 containsKey() method is used to check whether this map object contains a mappi…

java.lang.RuntimeException: Canvas: trying to draw too large(107331840bytes) bitmap.

环境: Android 8.0.1 MIUI 真机测试闪退 gradle 4.1 compileSdkVersion 26 buildToolsVersion 26.0.2 minSdkVersion 21 targetSdkVersion 26 错误: java.lang.RuntimeException: Canvas: trying to draw too large(107331840bytes) bitmap. 原因&#x…

python 创建对象_Python程序计算创建对象的数量

python 创建对象We are implementing this program using the concept of classes and objects. 我们正在使用类和对象的概念来实现该程序。 Firstly, we create the Class with "Student" name with 1 class variable(counter) , 2 instance variables or object a…

Android 的一些中文文档

https://blog.csdn.net/qq_36467463/article/details/77990089 //安卓mediaformat api详解 https://www.cnblogs.com/Xiegg/p/3428529.html -------->media codec的文…

深入计算机系统:操作系统管理硬件(The Operating SystemManages the Hardware)

文章目录1.7 操作系统管理硬件(The Operating SystemManages the Hardware)1.7.1 进程1.7.2 线程1.7.3 虚拟内存1.7.4 文件系统1.7 The Operating System Manages the Hardware1.7.1 Processes1.7.2 Threads1.7.3 Virtual Memory1.7.4 Files1.7 操作系统…

PM2怎么开启ES6?

node版本v6.14.2,无论是用配置文件 {"apps": [{"name": "server","script": "server.js","node_args":"--harmony","watch": true}] } 还是命令行 pm2 start server.js --node-ar…

Python词云wordcloud模板

很简单: import wordcloud import jieba import time starttime.perf_counter() fopen(xyy.txt,r,encodinggbk) #这里的编码格式还不太了解,有的用utf-8,有的用gbk tf.read() f.close() lsjieba.lcut(t) txt .join(ls) wwordcloud.WordCloud(font_pathmsyh.ttc,width1000,heigh…

struts下载

1、进入:http://struts.apache.org/download.cgi#struts2516 选择对应的版本,进行下载。 2、目录介绍 apps:简单的项目案例docs:学习文档lib:所需jar包src:源码转载于:https://www.cnblogs.com/Eileen-lu/p…