现在的位置: 首页 > 综合 > 正文

java获取工程目录下文件

2013年02月15日 ⁄ 综合 ⁄ 共 189字 ⁄ 字号 评论关闭
	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;
	}

抱歉!评论已关闭.