2013-07-09 115 views
2

我有複製文件,它是在一個罐子裏的一個問題:文件的路徑

URI ink2_1 = this.getClass().getClassLoader().getResource("Masi_INK2.bmp").toURI(); 
... 
Files.copy(Paths.get(sourceFile1), Paths.get(IAIOutputFile+requestId+"_INK1.bmp")); 

路徑是不能夠解決的路徑

15:43:11,505 INFO [MainFake] searching for jar:file:/C:/workspace/clone/Tools/DummySimulator/DummySimulator-1.0-SNAPSHOT.jar!/Masi_INK2.bmp 
15:43:11,505 INFO [MainFake] Exception in thread "main" java.nio.file.FileSystemNotFoundException 
     at com.sun.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:171) 
     at com.sun.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:157) 
     at java.nio.file.Paths.get(Unknown Source) 
     at com.example.MainFake.processImages(MainFake.java:101) 

回答