private void fromJarToFs(final String jarPath, final String filePath) throws IOException {
            final File file = new File(filePath);
            if (file.exists()) {
                final boolean success = file.delete();
                if (!success) {
                    throw new IOException("couldn't delete " + filePath);
                }
            }
            InputStream is = null;
            OutputStream os = null;
            try {
                is = ClassLoader.getSystemClassLoader().getResourceAsStream(jarPath);
                os = new FileOutputStream(filePath);
                final byte[] buffer = new byte[8192];
                int bytesRead;
                while ((bytesRead = is.read(buffer)) != -1) {
                    os.write(buffer, 0, bytesRead);
                }
            } finally {
                if (is != null) {
                    is.close();
                }
                if (os != null) {
                    os.close();
                }
            }
        }