java - Put specific image in folder from resource -


i need put 1 specific image project specific folder in java. helping.

edit: im creating folder file , folder i'm creating need put image have in resources. helping.

you can use nio package in java 7 class files , static method copy.

import java.io.ioexception; import java.nio.file.files; import java.nio.file.path; import java.nio.file.paths; import java.nio.file.standardcopyoption;  public class main_copie {      public static void main(string[] args) {           path source = paths.get("data/image1.png");         path destination = paths.get("myfolder/image1_copied.png");          try {             files.copy(source, destination, standardcopyoption.replace_existing);            } catch (ioexception e) {             e.printstacktrace();         }     } } 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -