usmanazizgroupdocs
4/15/2016 - 10:32 AM

ApplyLicenseFromFile.java

// For complete examples and data files, please go to https://github.com/groupdocs-viewer/GroupDocs.Viewer-for-Java
/**
 * This method applies product license from file
 * 
 */
public static void applyLicenseFromFile() {
	try {
	    	// Setup license
	    	com.groupdocs.viewer.licensing.License lic = new com.groupdocs.viewer.licensing.License();
		lic.setLicense(licensePath.toString());
	} catch (Exception exp) {
		System.out.println("Exception: " + exp.getMessage());
		exp.printStackTrace();
		}
	}