Exception in thread “main” java.nio.file.InvalidPathException: Illegal char <:> at index 2:

前端 未结 4 1000
礼貌的吻别
礼貌的吻别 2020-12-15 16:57

I have to copy classpath resource from one package to another.

My program is:

    public static void main(String[] args) throws IOException, URISynta         


        
4条回答
  •  有刺的猬
    2020-12-15 17:42

    I have the same problem which I was facing from the past two days and finally, I got it Space causes such problem try to solve

    var fileName=YourFileName.trim();
    Path filePath = Paths.get(dirPathStr, fileName);
    

提交回复
热议问题