一、简介
使用eclipse的ide开发工具,经常遇到需要激活注册的“Update Subscription Wizard”窗口提示,提醒你的产品授权期快到期了 -“Activetion status:Product activation must be completed within 5 days”,如下图所示
二、解决办法
1. 到本网站的在线eclipse激活服务相关页面(链接到“eclipse在线注册激活”内容页面)生成或复制激活账户和激活码
2. 下载激活代码,在自己eclipse中运行,代码如下
import java.io.BufferedReader;@b@import java.io.IOException;@b@import java.io.InputStreamReader;@b@@b@public class MyEclipseGenMain{@b@ private static final String LL = "Decompiling this copyrighted software is a violation of both your license agreement and the Digital Millenium Copyright Act of 1998 (http://www.loc.gov/copyright/legislation/dmca.pdf). Under section 1204 of the DMCA, penalties range up to a $500,000 fine or up to five years imprisonment for a first offense. Think about it; pay for a license, avoid prosecution, and feel better about yourself.";@b@@b@ public String getSerial(String userId, String licenseNum) {@b@ java.util.Calendar cal = java.util.Calendar.getInstance();@b@ cal.add(1, 3);@b@ cal.add(6, -1);@b@ java.text.NumberFormat nf = new java.text.DecimalFormat("000");@b@ licenseNum = nf.format(Integer.valueOf(licenseNum));@b@@b@ String verTime = new StringBuffer("-")@b@ .append(new java.text.SimpleDateFormat("yyMMdd").format(cal@b@ .getTime())).append("0").toString();@b@ String type = "YE3MP-";@b@ String need = new StringBuilder(userId.substring(0, 1)).append(type)@b@ .append("300").append(licenseNum).append(verTime).toString();@b@ String dx = new StringBuilder(need).append(LL).append(userId)@b@ .toString();@b@ int suf = this.decode(dx);@b@ String code = new StringBuilder(need).append(String.valueOf(suf))@b@ .toString();@b@ return this.change(code);@b@ }@b@@b@ private int decode(String s) {@b@ int i;@b@ char[] ac;@b@ int j;@b@ int k;@b@ i = 0;@b@ ac = s.toCharArray();@b@ j = 0;@b@ k = ac.length;@b@ while (j < k) {@b@ i = (31 * i) + ac[j];@b@ j++;@b@ }@b@ return Math.abs(i);@b@ }@b@@b@ private String change(String s) {@b@ byte[] abyte0;@b@ char[] ac;@b@ int i;@b@ int k;@b@ int j;@b@ abyte0 = s.getBytes();@b@ ac = new char[s.length()];@b@ i = 0;@b@ k = abyte0.length;@b@ while (i < k) {@b@ j = abyte0[i];@b@ if ((j >= 48) && (j <= 57)) {@b@ j = (((j - 48) + 5) % 10) + 48;@b@ } else if ((j >= 65) && (j <= 90)) {@b@ j = (((j - 65) + 13) % 26) + 65;@b@ } else if ((j >= 97) && (j <= 122)) {@b@ j = (((j - 97) + 13) % 26) + 97;@b@ }@b@ ac[i] = (char) j;@b@ i++;@b@ }@b@ return String.valueOf(ac);@b@ }@b@@b@ public MyEclipseGenMain() {@b@ super();@b@ }@b@@b@ public static void main(String[] args) {@b@ try {@b@ System.out.println("please input register name:");@b@ BufferedReader reader = new BufferedReader(new InputStreamReader(@b@ System.in));@b@ String userId = null;@b@ userId = reader.readLine();@b@ MyEclipseGenMain myeclipsegen = new MyEclipseGenMain();@b@ String res = myeclipsegen.getSerial(userId, "5");@b@ System.out.println("Serial:" + res);@b@ reader.readLine();@b@ } catch (IOException ex) {@b@ }@b@ }@b@}
如运行结果
please input register name:@b@xwood888@b@Serial:kLR8ZC-855550-645469533100579