首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > Web前端 >

java 途径的读取

2012-09-28 
java 路径的读取?//E:\Jwork\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jquerytes

java 路径的读取

?//E:\Jwork\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\jquerytest\WEB-INF\classes\image\System.out.println(ServletActionContext.getRequest().getSession().getServletContext().getRealPath("/WEB-INF/classes/image/"));//jquerytestSystem.out.println(ServletActionContext.getRequest().getSession().getServletContext().getContextPath());// 获取被编译的文件路径  .getClassLoader() /E:/Jwork/jquerytest/build/classes/System.out.println(Test.class.getClassLoader().getResource("").getPath());//获取当前系统目录   /E:/Jwork/jquerytest/build/classes/cn/easier/System.out.println(Test.class.getResource("").getPath());//获取当前工程的绝对目录 E:\Jwork\jquerytestString path= System.getProperty("user.dir");System.out.println(path);File file=new File(path);System.out.println(file.exists());System.out.println(file.mkdirs());

热点排行