public synchronized static void install() {
        if (!isInstalled()) {
            InputStream is = BMPCLocalLauncher.class.getResourceAsStream(BMP_LOCAL_ZIP_RES);
            try {
                // Unzip BrowserMob Proxy contained in the project "/resources"
                unzip(is, BMPC_USER_DIR);

                // Set executable permissions on the BrowserMob Proxy lanching scripts
                new File(BMP_LOCAL_EXEC_UNIX).setExecutable(true);
                new File(BMP_LOCAL_EXEC_WIN).setExecutable(true);

                // Check there is an installed version
                installedVersion();
            } catch (Exception e) {
                throw new BMPCUnexpectedErrorException("Installation failed", e);
            }
        }
    }
public synchronized static void install ( ) { if ( ! isInstalled ( ) ) { InputStream is = BMPCLocalLauncher . class . getResourceAsStream ( BMP_LOCAL_ZIP_RES ) ; try { unzip ( is , BMPC_USER_DIR ) ; new File ( BMP_LOCAL_EXEC_UNIX ) . setExecutable ( true ) ; new File ( BMP_LOCAL_EXEC_WIN ) . setExecutable ( true ) ; installedVersion ( ) ; } catch ( Exception e ) { throw new BMPCUnexpectedErrorException ( "Installation failed" , e ) ; } } }
Install Local BrowserMob Proxy.