new File(String url, String child) modify url
问题 I'm trying to create a new File passing a url as parent pathName and the fileName as child. File savedFile = new File(Path.getPathDocumentAttach(), renameTo); The path Path.getPathDocumentAttach() is correct, but the url "https://...." it's modified to "https:/...." (with only 1 "/"). So, when I pass savedFile to FileItem.write(savedFile) I got a java.lang.NullPointerException . What am I doing wrong? What can I do to make it works? ps. I want to save the file in the url I'm passing as first