Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -src
- -images
- -*.jpg
- -stock
- -*.java
- -images (exact copy of -images)
- -jar
- -images
- -*.jpg
- -stock
- -*.java
- -images (folder is created but files don't get copied)
- File imagesCopy = new File("images");
- File imagesOrg = new File(URLDecoder.decode(getClass().getResource("/images").getPath()));
- if (!imagesCopy.exists()) {
- imagesCopy.mkdir();
- for(final File child : imagesOrg.listFiles()) {
- try{
- Files.copy(child.toPath(), Paths.get(imagesCopy.getAbsolutePath()+"/"+child.getName()), REPLACE_EXISTING);
- }catch(Exception e){
- System.out.println(e);
- }
- }
- }
- File imagesOrg = new File(URLDecoder.decode(getClass().getResource("/images").getPath()));
- D:Codebuildclassesimages
- D:Codedistfile:D:Codedistegz.jar!images
- D:Codedistegz.jar!images
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement