public void handleLicenseAcceptance(LicenseProvider licenseProvider, boolean acceptLicense) {
        //
        // Display license requirement
        //
        SelfExtract.wordWrappedOut(SelfExtract.format("licenseStatement", new Object[] { licenseProvider.getProgramName(), licenseProvider.getLicenseName() }));
        System.out.println();

        if (acceptLicense) {
            // Indicate license acceptance via option
            SelfExtract.wordWrappedOut(SelfExtract.format("licenseAccepted", "--acceptLicense"));
            System.out.println();
        } else {
            // Check for license agreement: exit if not accepted.
            if (!obtainLicenseAgreement(licenseProvider)) {
                System.exit(0);
            }
        }
    }
public void handleLicenseAcceptance ( LicenseProvider licenseProvider , boolean acceptLicense ) { SelfExtract . wordWrappedOut ( SelfExtract . format ( "licenseStatement" , new Object [ ] { licenseProvider . getProgramName ( ) , licenseProvider . getLicenseName ( ) } ) ) ; System . out . println ( ) ; if ( acceptLicense ) { SelfExtract . wordWrappedOut ( SelfExtract . format ( "licenseAccepted" , "--acceptLicense" ) ) ; System . out . println ( ) ; } else { if ( ! obtainLicenseAgreement ( licenseProvider ) ) { System . exit ( 0 ) ; } } }
This method will print out information about the license and if necessary prompt the user to accept it.

@param licenseProvider The license provider to use to get information about the license from the archive
@param acceptLicense   <code>true</code> if the license should be automatically accepted