Copy files from resources to folder : <p>im trying to copy an folder with 26 files (A-Z) to another directory. So far so good, everything works if i start the program with my IDE. But if im running the exported jar it doesn't work. I allready looked into the jar and the folder which i want to copy is there. </p>

<pre><code>private void copyCharacterFiles() {
    for (String s : Utils.ALPHABET) {


        try {
            File source = new File("resources/characters/" + s.toUpperCase() + ".yml");
            File dest   = new File(APPLICATION_PATH + PATHSEPARATOR + "characters" + PATHSEPARATOR + s.toUpperCase() + ".yml");

            FileChannel sourceChannel = null;
            FileChannel destChannel = null;

            try {
                sourceChannel = new FileInputStream(source).getChannel();
                destChannel = new FileOutputStream(dest).getChannel();
                destChannel.transferFrom(sourceChannel, 0, sourceChannel.size());
            } finally {
                sourceChannel.close();
                destChannel.close();
            }


        } catch (IOException e) {
            e.printStackTrace();
        }
    }
}
</code></pre>

<p>Thanks for the help^^</p>
