锘??xml version="1.0" encoding="utf-8" standalone="yes"?>
1銆佸緩绔媕ava Project錛屼換鎰忓彇涓悕瀛楀氨琛屻?
2銆佸緩绔嬩竴涓悕瀛椾負MyEclipseGen鐨勭被鏂囦歡錛屽唴瀹硅欏靛熬銆?
3銆佽繍琛屼唬鐮侊紝鍦ㄦ帶鍒跺彴涓細鍑虹幇錛?
please input register name:
×××××錛堜綘鐨刵ame,闅忎究鍐欙級
榪欐牱灝卞彲浠ョ敓鎴愬簭鍒楀彿
4銆佽繘鍏yeclipse,杈撳叆Subscriber鍜孲ubscription code鍗沖彲銆?
闄?
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) {
}
}
}
“Set project compiler compliance settings to '1.5'”
“Syntax error, type parameters are only available if source level is 1.5”
榪欐椂鍊欓渶瑕佹敼鍔ㄤ袱涓湴鏂癸細
1.鍙沖嚮欏圭洰-->properties-->java compiler -->閫夋嫨enabel project specific setting -->Compiler compliance level :閫夋嫨1.5鐗堟湰錛屽叾浠栭粯璁?
2.鍙沖嚮欏圭洰-->properties -->project facets-->灝唈ava鍚庣殑涓嬫媺妗嗛夋嫨涓?.0
鑷姩鎻愮ず錛?/p>
1.浠嶹indow -> preferences -> Java -> Editor -> Content assist -> Auto-Activation涓嬶紝鎴戜滑鍙互鍦?."鍙峰悗闈㈠姞鍏ユ垜浠渶瑕佽嚜鍔ㄦ彁 紺虹殑棣栧瓧騫曪紝姣斿"abcd"銆?br /> 鐒跺悗鎴戜滑鍥炲埌Eclipse鐨勫紑鍙戠幆澧冿紝杈撳叆"a"錛屾彁紺哄氨鍑虹幇浜嗐?/p>
2.榪欎釜Auto-Activation涓嬬殑杈撳叆妗嗛噷鏈澶氬彧鑳借緭鍏?涓瓧姣?/p>
鍦?."鍚庨潰闅忎究杈撳叆鍑犱釜瀛楃錛屾瘮濡?abcd"錛岀劧鍚庡洖鍒板紑鍙戠幆澧冿紝File -> export -> general -> preferences -> 閫変竴涓湴鏂?/p>
淇濆瓨浣犵殑棣栭夐」錛屾瘮濡侰:\a.epf
鐢? 浠諱綍鏂囨湰緙栬緫鍣ㄦ墦寮a.epf錛屾煡鎵懼瓧絎︿覆“abcd”錛屾壘鍒頒互鍚庯紝鏇挎崲鎴?#8220;opqrstuvwxyz...浠諱綍浣犳兂瑕佺殑瀛楃”
鍥炲埌Eclipse錛孎ile -> import -> general -> preferences -> 瀵煎叆鍒氭墠鐨刟.epf鏂囦歡銆?/p>
3.鏃墮棿鍙互璁句負50姣
蹇嵎閿ˉ鍏?
1.鍦╳indow-->preferences-->general-->keys涓嬶紝鍏堟壘鍒癆lt+/錛岀劧鍚庡皢鍏惰緗負鍏朵粬蹇嵎閿?/p>
2.鎵懼埌commond涓篶ontent assist鐨勫揩鎹烽敭錛岀劧鍚庡皢鍏惰緗負alt+/錛岃繖鏍峰氨鏄垜浠啛鎮夌殑琛ュ叏浜?br />