您的位置:首页 > 编程语言 > Java开发

java 获取指定的信息

2012-03-15 18:42 288 查看
public class systemdemo {
public static void main(String[] args) {
System.out.println("系统版本为:"+System.getProperty("os.name")+System.getProperty("os.version")+System.getProperty("os.arch"));
System.out.println("系统用户为:"+System.getProperty("user.name"));
System.out.println("当前用户目录:"+System.getProperty("user.home"));
System.out.println("当前用户工作目录: "+System.getProperty("user.dir"));
}
}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: