private File extractFromJar(String filename) {
        try {
            String tmpFilePath = System.getProperty("java.io.tmpdir");
            File efile = new File(tmpFilePath, filename.substring(filename.lastIndexOf("/")+1));
            if(efile.exists())
                efile.delete();
            InputStream in = new BufferedInputStream(super.getClass().getResourceAsStream(filename));
            OutputStream out = new BufferedOutputStream(new FileOutputStream(efile));
            byte[] buffer = new byte[2048];
            for (;;)  {
                int nBytes = in.read(buffer);
                if (nBytes <= 0)
                    break;
                out.write(buffer, 0, nBytes);
            }
            out.flush();
            out.close();
            in.close();
            return efile;
        } catch (Exception e) {
            return null;
        }
    }