易截截图软件、单文件、免安装、纯绿色、仅160KB

java 通过System.getProperties()获取系统参数

java 通过System.getProperties()获取系统参数
Properties props=System.getProperties(); //系统属性
   System.out.println("Java的运行环境版本:"+props.getProperty("java.version"));
   System.out.println("Java的运行环境供应商:"+props.getProperty("java.vendor"));
   System.out.println("Java供应商的URL:"+props.getProperty("java.vendor.url"));
   System.out.println("Java的安装路径:"+props.getProperty("java.home"));
   System.out.println("Java的虚拟机规范版本:"+props.getProperty("java.vm.specification.version"));
   System.out.println("Java的虚拟机规范供应商:"+props.getProperty("java.vm.specification.vendor"));
   System.out.println("Java的虚拟机规范名称:"+props.getProperty("java.vm.specification.name"));
   System.out.println("Java的虚拟机实现版本:"+props.getProperty("java.vm.version"));
   System.out.println("Java的虚拟机实现供应商:"+props.getProperty("java.vm.vendor"));
   System.out.println("Java的虚拟机实现名称:"+props.getProperty("java.vm.name"));
   System.out.println("Java运行时环境规范版本:"+props.getProperty("java.specification.version"));
   System.out.println("Java运行时环境规范供应商:"+props.getProperty("java.specification.vender"));
   System.out.println("Java运行时环境规范名称:"+props.getProperty("java.specification.name"));
   System.out.println("Java的类格式版本号:"+props.getProperty("java.class.version"));
   System.out.println("Java的类路径:"+props.getProperty("java.class.path"));
   System.out.println("加载库时搜索的路径列表:"+props.getProperty("java.library.path"));
   System.out.println("默认的临时文件路径:"+props.getProperty("java.io.tmpdir"));
   System.out.println("一个或多个扩展目录的路径:"+props.getProperty("java.ext.dirs"));
   System.out.println("操作系统的名称:"+props.getProperty("os.name"));
 &


相关文档:

Java变长参数

在Java5中提供了变长参数,也就是在方法定义中可以使用个数不确定的参数,对于同一方法可以使用不同个数的参数调用,例如:print("hello");print("hello","lisi");print("hello","张三");下面介绍如何定义可变长参数以及如何使用可变长参数。
1、可变长参数方法的定义
使用...表示可变长参数,例如
print(String... args ......

java HashSet去重示例

import java.util.ArrayList;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
public class HashSetDemo {

public static void main(String[] args){
List tableList = new ArrayList();
tableList.add("hello");
tableList.add("hell0");
tableList.add("world");
......

java字符串替换字符串实例,对replace方法的重写

package com.citycollege.stw;
public class testreplace {
 
 
 public static final String replace( String line, String oldString, String newString )
    {
        if (line == null)
   {
    return null ......

关于Java Advanced Imaging(JAI)的一点积累

JAI的确是个不错的东东,图形渲染上提供了比较好的类封装以及跨平台性。不知道为何JAI就在2006年止步在1.1.3的版本下了,莫非Sun(Oracle)真的去做Java 2D的丰富去了。暂时还没有看到Java 2D方面的资料,先把JAI的内容贴出来。
下载JAI可以去这里 http://download.java.net/media/jai/builds/release/1_1_3/
想要了解它的� ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号