首先,找到安装目录下的"LicenseManagerDomain.js"文件,路径"StarUMLwwwlicense odeLicenseManagerDomain.js";
修改function validate(PK, name, product, licenseKey)函数如下:
function validate(PK, name, product, licenseKey) { var pk, decrypted; // edit by Chary return { name: "Chary", product: "StarUML", licenseType: "vip", quantity: "www.cnblogs.com/Chary", licenseKey: "later equals never!" }; try { pk = new NodeRSA(PK); decrypted = pk.decrypt(licenseKey, 'utf8'); } catch (err) { return false; } var terms = decrypted.trim().split(" "); if (terms[0] === name && terms[1] === product) { return { name: name, product: product, licenseType: terms[2], quantity: terms[3], licenseKey: licenseKey }; } else { return false; } }
最后,打开安装好的StarUML,选择"help"->"enter license"。然后按上述代码中的name和licenseKey输入相应的内容,确定后便会提示注册成功。
Name:Chary
LicenseKey:later equals never!