//获取桌面路径
FileSystemView fsv = FileSystemView.getFileSystemView();
File file= fsv.getHomeDirectory();
System.out.println(file.getPath());
//获取tomcat的绝对路径
String tomcatPath=getServletConfig().getServletContext().getRealPath("");
//获取桌面路径
FileSystemView fsv = FileSystemView.getFileSystemView();
File file= fsv.getHomeDirectory();
System.out.println(file.getPath());
//获取tomcat的绝对路径
String tomcatPath=getServletConfig().getServletContext().getRealPath("");