MyEclipse7.0 :downloads.myeclipseide.com/downloads/products/eworkbench/7.0M1/MyEclipse_7.0M1_E3.4.0_Installer.exe
http://downloads.myeclipseide.com/downloads/products/eworkbench/7.0M1/MyEclipse_7.0M1_E3.4.0_Installer.exe
1、建立java Project,任意取個名字就行。
2、建立一個名字為MyEclipseGen的類檔案,內容見附件。
3、運行該代碼,在控制台中會出現:
please input register name:
×××××(你的name)
即產生序號:
4、進入myeclipse,輸入Subscriber和Subscription code即可。
附件:
import java.io.BufferedReader;<br />import java.io.IOException;<br />import java.io.InputStreamReader;</p><p>public class MyEclipseGen {<br />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.";</p><p>public String getSerial(String userId, String licenseNum) {<br />java.util.Calendar cal = java.util.Calendar.getInstance();<br />cal.add(1, 3);<br />cal.add(6, -1);<br />java.text.NumberFormat nf = new java.text.DecimalFormat("000");<br />licenseNum = nf.format(Integer.valueOf(licenseNum));<br />String verTime = new StringBuilder("-").append(new java.text.SimpleDateFormat("yyMMdd").format(cal.getTime())).append("0").toString();<br />String type = "YE3MP-";<br />String need = new StringBuilder(userId.substring(0, 1)).append(type).append("300").append(licenseNum).append(verTime).toString();<br />String dx = new StringBuilder(need).append(LL).append(userId).toString();<br />int suf = this.decode(dx);<br />String code = new StringBuilder(need).append(String.valueOf(suf)).toString();<br />return this.change(code);<br />}</p><p>private int decode(String s) {<br />int i;<br />char[] ac;<br />int j;<br />int k;<br />i = 0;<br />ac = s.toCharArray();<br />j = 0;<br />k = ac.length;<br />while (j < k) {<br />i = (31 * i) + ac[j];<br />j++;<br />}<br />return Math.abs(i);<br />}</p><p>private String change(String s) {<br />byte[] abyte0;<br />char[] ac;<br />int i;<br />int k;<br />int j;<br />abyte0 = s.getBytes();<br />ac = new char[s.length()];<br />i = 0;<br />k = abyte0.length;<br />while (i < k) {<br />j = abyte0[i];<br />if ((j >= 48) && (j <= 57)) {<br />j = (((j - 48) + 5) % 10) + 48;<br />} else if ((j >= 65) && (j <= 90)) {<br />j = (((j - 65) + 13) % 26) + 65;<br />} else if ((j >= 97) && (j <= 122)) {<br />j = (((j - 97) + 13) % 26) + 97;<br />}<br />ac[i] = (char) j;<br />i++;<br />}<br />return String.valueOf(ac);<br />}</p><p>public MyEclipseGen() {<br />super();<br />}</p><p>public static void main(String[] args) {<br />try {<br />System.out.println("please input register name:");<br />BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));<br />String userId = null;<br />userId = reader.readLine();<br />MyEclipseGen myeclipsegen = new MyEclipseGen();<br />String res = myeclipsegen.getSerial(userId, "5");<br />System.out.println("Serial:" + res);<br />reader.readLine();<br />} catch (IOException ex) {<br />}<br />}<br />}<br />
我運行後的結果:
please input register name:
sorc
Serial:fLR8ZC-855550-6654585354305964
註: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.";
此段代碼常量不可變更 否則註冊碼無效
Microsoft SQL Server 2000 - 8.00.194 (Intel X86)
Aug 6 2000 00:57:48
Copyright (c) 1988-2000 Microsoft Corporation
Personal Edition on Windows NT 5.2 (Build 3790: Service Pack 2)