Java:
public File fileCopyToDirectory(String ProjectP, File input)throws IOException {
try {
System.out.println(input.getName());
System.out.println("los gehts");
System.out.println(input.getAbsolutePath());
System.out.println(ProjectP +input.getName());
Path source = Paths.get(input.getAbsolutePath());
Path target = Paths.get(ProjectP +input.getName());
Files.copy(source, target, REPLACE_EXISTING);
output:
los gehts
C:\Users\vimar\Desktop\Cowslip.JPG
D:\new\dist/Tools/JPGTOPPM/Cowslip.JPG
java.nio.file.NoSuchFileException: C:\Users\vimar\Desktop\Cowslip.JPG -> D:\new\
dist\Tools\JPGTOPPM\Cowslip.JPG
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
jemand ne idee warum? mir fällt nur dieses backslash slash hin und her auf -.-
Zuletzt bearbeitet: