Hi, I want to copy "play button.png" to "C:\Users\Wyatt\AppData\Roaming\.The Labyrinth\Assets\Images". I tried useing this code:
File appdata = new File(System.getenv("APPDATA"));
File datafolder = new File(appdata, ".The Labyrinth");
File assets = new File(datafolder, "Assets");
assets.mkdir();
Files.copy(Paths.get("src\\main\\resources\\assets\\play button.png"), Paths.get(assets + "\\Images\\play button.png"));
But it throws an exception.
java.nio.file.NoSuchFileException: src\main\resources\assets\play button.png -> C:\Users\Wyatt\AppData\Roaming\.The Labyrinth\Assets\Images\play button.png
at sun.nio.fs.WindowsException.translateToIOException(Unknown Source)
at sun.nio.fs.WindowsException.rethrowAsIOException(Unknown Source)
at sun.nio.fs.WindowsFileCopy.copy(Unknown Source)
at sun.nio.fs.WindowsFileSystemProvider.copy(Unknown Source)
at java.nio.file.Files.copy(Unknown Source)
at com.awsp8.labyrinth.TheLabyrinth.install(TheLabyrinth.java:73)
at com.awsp8.labyrinth.TheLabyrinth.main(TheLabyrinth.java:32)
TheLabyrinth.java:73 is this code:
Files.copy(Paths.get("src\\main\\resources\\assets\\play button.png"), Paths.get(assets + "\\Images\\play button.png"));
Maybe I'm doing this wrong? I dont know. Thanks in advance.