import java.io.*;
import java.util.*;
class PrintPropertiesToStreamDemo
{
public static void main(String[] args) throws IOException
{
Properties ps = System.getProperties();
//打印到标准输出设置
ps.list(System.out);
//通过流打印到文件
ps.list(new PrintStream(new File("sysinfo.txt")));
}
}
import java.util.*;
class PrintPropertiesToStreamDemo
{
public static void main(String[] args) throws IOException
{
Properties ps = System.getProperties();
//打印到标准输出设置
ps.list(System.out);
//通过流打印到文件
ps.list(new PrintStream(new File("sysinfo.txt")));
}
}