java 项目获取项目根目录
System.out.println("输出classpath:"+ System.getProperties().getProperty("user.dir"));
java Web项目获取classpath根目录
System.out.println("输出classpath:"+ System.getProperties().getProperty("webapp.root"));
java 项目获取项目根目录
System.out.println("输出classpath:"+ System.getProperties().getProperty("user.dir"));
java Web项目获取classpath根目录
System.out.println("输出classpath:"+ System.getProperties().getProperty("webapp.root"));