java获取用户的当前工作目录
http://www.diybl.com/ 2008-3-11 网络 点击:
[ 评论 ]
文章搜索:
【点击打包该文章】
import java.io.*;
public class Pathtest
{
public static void main(String args[]){
//方法一
System.out.println(System.getProperty("user.dir"));
//方法二
File file = new File("");
System.out.println(file.getAbsolutePath());
}
}
如果图片或页面不能正常显示请点击这里 站内搜索:
推荐文章 |
