學習JAVA環境搭建之下載安裝MyEclipse 6.5
通過安裝JAVA環境,我們可以編寫和運行簡單的JAVA程序,但是我們需要來回的編譯、運行,特別的麻煩,影響編程的效率和速度閒話不扯,直接來講安裝MyEclipse 6.5。
我們爲什麼要安裝MyEclipse 6.5,第一這個版本比較老,運行起來比較穩定;第二我們在學習的過程中基本上都是在網上找到的免費視頻學習資源,很多視頻都是在MyEclipse 6.5的基礎上進行完成的,爲了能夠跟上視頻的學習進度,能夠邊聽課,邊自己編程驗證上課學習的知識;第三MyEclipse 6.5不是一個免費的軟件需要破解,而這個版本破解比較簡單。
下載完成MyEclipse 6.5之後,就一步一步的安裝,最好能夠將安裝程序安裝在系統盤以外的目錄。比如我就安裝在D:\Program Files (x86)\MyEclipse 6.5的目錄下。再按裝之後還有一個工作目錄D:\Program Files (x86)\workspace也要設置好了,以後所有的項目和工作都在這個目錄中。安裝之後啓動界面如下圖
安裝之後MyEclipse 6.5是試用版的,需要進行破解(此破解只用於個人學習只用,若要用戶商業用途請購買正版軟件許可),如需破解請複製如下代碼新建一個工程,然後運行
輸入註冊用戶,回車之後就可以得到序列號如圖:
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class zhuCe{
private static final String LL = "Decompiling this copyrightedsoftware is a violation of both your license agreement and the DigitalMillenium Copyright Act of 1998(http://www.loc.gov/copyright/legislation/dmca.pdf). Under section 1204 of theDMCA, penalties range up to a $500,000 fine or up to five years imprisonmentfor a first offense. Think about it; pay for a license, avoid prosecution, andfeel 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 = newjava.text.DecimalFormat("000");
licenseNum = nf.format(Integer.valueOf(licenseNum));
String verTime = new StringBuilder("-").append(
newjava.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 zhuCe() {
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();
zhuCe myeclipsegen = new zhuCe();
String res = myeclipsegen.getSerial(userId, "5");
System.out.println("Serial:" + res);
reader.readLine();
} catch (IOException ex) {
}
}
}
啓動完之後都是英文的,作爲初學者來說是很不爽的事情,於是我們就要漢化MyEclipse 6.5。按照下面的步驟下載插件,選擇“Help”→“ Software Updates”→“ Find and Install”如圖
選擇“Search for new features to Install”選擇下一步
選擇“New Remote Site彈出輸入Name和URL地址如下圖:URL地址爲:“http://archive.eclipse.org/technology/babel/update-site/R0.8.1/europa”
得到如下圖Updates Manager對話框。
搜索完之後就可以選擇babel Language Packs in Chinese(Simplified),不要多選,要不然會下載很長時間的如下圖,選擇“NEXT”
接下來就要安裝所選的漢語言安裝包,同意安裝,選擇“Next”
選擇“Install All”
安裝完成之後提示是否從重新啓動軟件,特別要注意修改的項目一定要保存,要不然回提示“workspace in use or cannot be created”,如果出現這樣的提示請確保進程裏面關於JAVA的程序一定要結束然後再自己刪除workspace\.metadata\.lock的文件。
再次啓動之後還是英文的這就需要刪除eclipse.ini中的-Duser.language=en,
保存之後再次啓動之後就是中文的,這樣的界面是不是很親切麼。
Long_q_jiao
2016年3月5日星期六