public static final void copyResource ( String source , Path target , Class < ? > cls ) throws IOException { try ( InputStream is = cls . getResourceAsStream ( source ) ) { Files . copy ( is , target , REPLACE_EXISTING ) ; } }
Copies class resource to path