欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

java中获取系统路径的方法 java系统路径 

程序员文章站 2022-07-12 09:54:27
...

在Application中: 
System.getProperty("user.dir") 
在Servlet中: 
ServletContext servletContext = config.getServletContext(); 
String rootPath = servletContext.getRealPath("/"); 
在jsp中: 
application.getRealPath("")

相关标签: java 系统路径