⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 getsysprop.java

📁 java应用开发详解
💻 JAVA
字号:
import java.security.*;class getSysProp{    public static void main(String[] args)     {        String s;        try         {            //默认返回字串为not specified            //得到系统名称            s = System.getProperty("os.name", "not specified");            System.out.println("  The name of your operating system is: " + s);       	    //得到java虚拟机版本号            s = System.getProperty("java.version", "not specified");            System.out.println("  The version of the JVM you are running is: " + s);	    //得到用户路径            s = System.getProperty("user.home", "not specified");            System.out.println("  Your user home directory is: " + s);	    //得到java_home            s = System.getProperty("java.home", "not specified");            System.out.println("  Your JRE installation directory is: " + s);	} 	catch (Exception e) 	{	    e.printStackTrace();        }    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -