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

java获取工程目录下文件

2012-09-15 13:05 309 查看
static{
		String root = Constants.class.getResource("/").getFile();
		try {
			root = new File(root).getCanonicalPath();
			root += File.separator;
		} catch (IOException e) {
			throw new RuntimeException(e);
		}
		file_url = root;
	}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: