zoukankan      html  css  js  c++  java
  • System中可以获取到的property等数据

    public class Test {
        public static void main(String[] args) {
            String javaVersion = System.getProperty("java.version");//Java运行环境版本
            String javaVendor = System.getProperty("java.vendor");//Java运行时环境供应商
            String javaVendorUrl = System.getProperty("java.vendor.url");//Java供应商URL
            String javaHome = System.getProperty("java.home");//Java安装目录
            String javaVmSpecificationVersion = System.getProperty("java.vm.specification.version");//Java虚拟机规范版本
            String javaVmSpecificationVendor = System.getProperty("java.vm.specification.vendor");//Java虚拟机规范供应商
            String javaVmSpecificationName = System.getProperty("java.vm.specification.name");//Java虚拟机规范名称
            String javaVmVersion = System.getProperty("java.vm.version");//Java虚拟机实现版本
            String javaVmVendor = System.getProperty("java.vm.vendor");//Java虚拟机实现供应商
            String javaVmName = System.getProperty("java.vm.name");//Java虚拟机实现名称
            String javaSpecificationVersion = System.getProperty("java.specification.version");//Java运行时环境规范版本
            String javaSpecificationVendor = System.getProperty("java.specification.vendor");//Java运行时环境规范供应商
            String javaSpecificationName = System.getProperty("java.specification.name");//Java运行时环境规范名称
            String javaClassVersion = System.getProperty("java.class.version");//Java类格式版本号
            String javaClassPath = System.getProperty("java.class.path");//Java类路径
            String javaLibraryPath = System.getProperty("java.library.path");//加载库时搜索的路径列表
            String javaIoTmpdir = System.getProperty("java.io.tmpdir");//默认的临时文件路径
            String javaCompiler = System.getProperty("java.compiler");//要使用的JIT编译器的名称
            String javaExtDirs = System.getProperty("java.ext.dirs");//一个或多个扩展目录的路径
            String osName = System.getProperty("os.name");//操作系统名称
            String osArch = System.getProperty("os.arch");//操作系统的架构
            String osVersion = System.getProperty("os.version");//操作系统版本
            String fileSeparator = System.getProperty("file.separator");//文件分隔符(在UNIX系统中是“/”)
            String pathSeparator = System.getProperty("path.separator");//路径分隔符(在UNIX系统中是“:”)
            String lineSeparator = System.getProperty("line.separator");//行分隔符(在UNIX系统中是“/n”)
            String userName = System.getProperty("user.name");//用户的账户名称
            String userHome = System.getProperty("user.home");//用户的主目录
            String userDir = System.getProperty("user.dir");//行分隔符(在UNIX系统中是“/n”)
    
            System.out.println("javaVersion:::::"+javaVersion);
            System.out.println("javaVendor:::::"+javaVendor);
            System.out.println("javaVendorUrl:::::"+javaVendorUrl);
            System.out.println("javaHome:::::"+javaHome);
            System.out.println("javaVmSpecificationVersion:::::"+javaVmSpecificationVersion);
            System.out.println("javaVmSpecificationVendor:::::"+javaVmSpecificationVendor);
            System.out.println("javaVmSpecificationName:::::"+javaVmSpecificationName);
            System.out.println("javaVmVersion:::::"+javaVmVersion);
            System.out.println("javaVmVendor:::::"+javaVmVendor);
            System.out.println("javaVmName:::::"+javaVmName);
            System.out.println("javaSpecificationVersion:::::"+javaSpecificationVersion);
            System.out.println("javaSpecificationVendor:::::"+javaSpecificationVendor);
            System.out.println("javaSpecificationName:::::"+javaSpecificationName);
            System.out.println("javaClassVersion:::::"+javaClassVersion);
            System.out.println("javaClassPath:::::"+javaClassPath);
            System.out.println("javaLibraryPath:::::"+javaLibraryPath);
            System.out.println("javaIoTmpdir:::::"+javaIoTmpdir);
            System.out.println("javaCompiler:::::"+javaCompiler);
            System.out.println("javaExtDirs:::::"+javaExtDirs);
            System.out.println("osName:::::"+osName);
            System.out.println("osArch:::::"+osArch);
            System.out.println("osVersion:::::"+osVersion);
            System.out.println("fileSeparator:::::"+fileSeparator);
            System.out.println("pathSeparator:::::"+pathSeparator);
            System.out.println("lineSeparator:::::"+lineSeparator);
            System.out.println("userName:::::"+userName);
            System.out.println("userHome:::::"+userHome);
            System.out.println("userDir:::::"+userDir);
        }
    }
    

      

  • 相关阅读:
    解决:Server IPC version 9 cannot communicate with client version 4
    解决Exception: org.apache.hadoop.io.nativeio.NativeIO$Windows.access0(Ljava/lang/String;I)Z
    hadoop解决windows下:Failed to set permissions of path: mp .staging to 0700
    find命令的使用
    linux解决端口冲突问题
    linux中实用的小工具lrzsz
    nginx常用命令
    编写测试用例的方法
    selenium之web自动化模拟操作(窗口,鼠标,键盘,js)
    什么是面向连接服务?什么是无连接服务?它们的区别是什么?
  • 原文地址:https://www.cnblogs.com/torchstar/p/15151590.html
Copyright © 2011-2022 走看看