String osUser=System.getProperty("user.name"); //获取计算机用户名称 String filePath = "C:/Users/" +osUser+ "/Downloads/";