Copy directory from a jar file
问题 I have recently developed an application and created the jar file. One of my classes creates an output directory, populating it with files from its resource. My code is something like this: // Copy files from dir \"template\" in this class resource to output. private void createOutput(File output) throws IOException { File template = new File(FileHelper.URL2Path(getClass().getResource(\"template\"))); FileHelper.copyDirectory(template, output); } Unfortunately this doesn\'t work. I tried the