不使用myeclipse注冊機(jī)得到myeclipse注冊碼的方法(myeclipse序列號)
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class MyEclipseGen {
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.";
public String getSerial(String userId, String licenseNum) {
java.util.Calendar cal = java.util.Calendar.getInstance();
cal.add(1, 3);
cal.add(6, -1);
java.text.NumberFormat nf = new java.text.DecimalFormat("000");
licenseNum = nf.format(Integer.valueOf(licenseNum));
String verTime = new StringBuilder("-").append(new java.text.SimpleDateFormat("yyMMdd").format(cal.getTime())) .append("0").toString();
String type = "YE3MP-";
String need = new StringBuilder(userId.substring(0, 1)).append(type).append("300").append(licenseNum).append(verTime).toString();
String dx = new StringBuilder(need).append(LL).append(userId).toString();
int suf = this.decode(dx);
String code = new StringBuilder(need).append(String.valueOf(suf)).toString();
return this.change(code);
}
private int decode(String s) {
int i;
char[] ac;
int j;
int k;
i = 0;
ac = s.toCharArray();
j = 0;
k = ac.length;
while (j < k) {
i = (31 * i) + ac[j];
j++;
}
return Math.abs(i);
}
private String change(String s) {
byte[] abyte0;
char[] ac;
int i;
int k;
int j;
abyte0 = s.getBytes();
ac = new char[s.length()];
i = 0;
k = abyte0.length;
while (i < k) {
j = abyte0[i];
if ((j >= 48) && (j <= 57)) {
j = (((j - 48) + 5) % 10) + 48;
} else if ((j >= 65) && (j <= 90)) {
j = (((j - 65) + 13) % 26) + 65;
} else if ((j >= 97) && (j <= 122)) {
j = (((j - 97) + 13) % 26) + 97;
}
ac[i] = (char) j;
i++;
}
return String.valueOf(ac);
}
public MyEclipseGen() {
super();
}
public static void main(String[] args) {
try {
System.out.println("please input register name:");
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String userId = null;
userId = reader.readLine();
MyEclipseGen myeclipsegen = new MyEclipseGen();
String res = myeclipsegen.getSerial(userId, "5");
System.out.println("Serial:" + res);
reader.readLine();
} catch (IOException ex) {
}
}
}
新建Java項(xiàng)目,復(fù)制該代碼新建類MyEclipseGen,運(yùn)行該代碼,在控制臺中會(huì)出現(xiàn):
please input register name:
×××××(輸入你的name,隨便什么)
即生成序列號: ××××× ××××× ×××××...
進(jìn)入myeclipse,在菜單中選擇 Myeclipse->Subscription Information 然后 輸入Subscriber和Subscription code即可。
相關(guān)文章
使用IDEA直接連接MySQL數(shù)據(jù)庫的方法
這篇文章主要介紹了如何使用IDEA直接連接MySQL數(shù)據(jù)庫,首先需要新建一個(gè)空項(xiàng)目,第一次連接 需要先下載驅(qū)動(dòng),文中給大家介紹的非常詳細(xì),感興趣的朋友跟隨小編一起看看吧2024-04-04
解決MyBatis-Plus使用動(dòng)態(tài)表名selectPage不生效的問題
這篇文章主要介紹了如惡化解決MyBatis-Plus使用動(dòng)態(tài)表名selectPage不生效的問題,文中通過示例代碼介紹的非常詳細(xì),對大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友們下面隨著小編來一起學(xué)習(xí)學(xué)習(xí)吧2023-11-11
java中java.util.Date和java.sql.Date之間的轉(zhuǎn)換的示例
java.util.Date是java.sql.Date的父類,有時(shí)候在和SqlServer數(shù)據(jù)庫打交道時(shí),也會(huì)遇到,本文主要介紹了java中java.util.Date和java.sql.Date之間的轉(zhuǎn)換的示例,具有一定的參考價(jià)值,感興趣的可以了解一下2024-05-05
解決SpringBoot中的Scheduled單線程執(zhí)行問題
在一次SpringBoot中使用Scheduled定時(shí)任務(wù)時(shí),發(fā)現(xiàn)某一個(gè)任務(wù)出現(xiàn)執(zhí)行占用大量資源,會(huì)導(dǎo)致其他任務(wù)也執(zhí)行失敗,這篇文章主要介紹了SpringBoot中的Scheduled單線程執(zhí)行問題及解決方法,需要的朋友可以參考下2022-06-06
淺析Java關(guān)鍵詞synchronized的使用
Synchronized是java虛擬機(jī)為線程安全而引入的。這篇文章主要為大家介紹一下Java關(guān)鍵詞synchronized的使用與原理,需要的可以參考一下2022-12-12

