code: static void copyFileFromResources(String sourcePath, String destPath) throws IOException {
          LOGGER.entering(new Object[] { sourcePath, destPath });
  
          File downloadFile = new File(destPath);
  
          if (!downloadFile.exists()) {
              InputStream stream = JarSpawner.class.getResourceAsStream(sourcePath);
              FileUtils.copyInputStreamToFile(stream, downloadFile);
              LOGGER.fine("File copied to " + destPath);
          }
          LOGGER.exiting();
      }
docs: Copy file from source path to destination location
  
  @param sourcePath
  Resource path of the source file
  @param destPath
  Path of the destination file
  @throws IOException