我用的是myeclipse10.0做的優化,早起版本8.5、8.5也都大同小異
一、Myeclipse10修改字型
MyEclipse10是基于Eclipse3.7核心,但在Eclipse的Preferences-〉general-〉 Appearance->Colors and Fonts 中并沒有找到Courier New字型,它采用的是Consolas字型,中文看着非常小非常别扭,在Windows7下,系統自帶雖然有Courier New字型,但是并沒有激活顯示,需要手動激活,才能在軟體中使用
激活方法如下:
在win7的控制台->字型,找到Courier New,右鍵,顯示。 Courier 正常 ,右鍵,顯示。
window-->preferences-->搜尋font-->Color and Font-->Basic-->Text Font-->Edit--> Courier New-->正常-->四号
二、myeclipse修改jsp、xml預設打開方式
window-->preferences-->General-->Editors-->File Associations-->選擇File Type-->
Associated editors選擇預設的打開方式(Default)
三、Myeclipse修改編譯相容級别_Compiler compliance Level
Window-->Preferences-->Java-->Compiler --> Compiler compliance Level-->1.6
四、修改Myeclipse編碼方式:text+jsp
1. window-->preferences-->搜尋JSP-->Myeclipse-->Files and Editors-->JSP-->encoding-->UTF-8
2. window-->preferences-->General-->Workspace-->Text file encoding-->Other-->UTF-8
五、myeclipse修改Jboss記憶體大小
myeclipse菜單欄:Preferences-->搜尋Jboss-->Jboss7.X下-->JDK--Optional java VM arguments加入如下代碼:
-Xms512m -Xmx1024m -XX:MaxNewSize=256m -XX:MaxPermSize=256m
六、老是彈出Quick update error 、關閉myeclipse的Quick Update自動更新功能
這個問題的解決辦法是關閉自動更新
Windows > Preferences > MyEclipse Enterprise Workbench > Community Essentials,
把選項 "Search for new features on startup"的前勾去掉即可。
七 、關閉updating indexes
Window > Preferences > Myeclipse Enterprise Workbench > Maven4Myeclipse > Maven>
禁用Download repository index updates on startup 。
注意:強調一個問題,很多人發現無法找到這個,原因其實是它已經關閉了。
八 、關閉MyEclipse的自動validation
validation有一堆,什麼xml、jsp、jsf、js等等,我們沒有必要全部都去自動校驗一下,
隻是需要的時候才會手工校驗一 下,速度立馬提升好幾個檔次
8.1取消MyEclipse在啟動時自動驗證項目配置檔案
默 認情況下MyEclipse在啟動的時候會自動驗證每個項目的配置檔案,這是一個非常耗時的過程,可以在Preferences視窗依次選擇 MyEclipse - Validation,然後在右側的Validator清單中隻保留 Manual 項就可以了。如果需要驗證的時候隻需要選中檔案,然後右鍵選擇 MyEclipse - Run Validation就可以了。
windows–>perferences–>myeclipse–>validation
把 除了manual 下面的全部點掉,build下隻留 classpath dependency Validator
8.2手工驗證方法:
在要驗證的檔案上,單擊滑鼠右鍵–>myeclipse–>run validation
九 、關閉拼寫檢查
拼寫檢查會給我們帶來不少的麻煩,我們的方法命名都會是單詞的縮寫,他也會提示有錯,是以最好去掉,沒有多大的用處:
windows–>perferences–>general–>validation->editors->Text Editors->spelling -->Enable spell checking
十、 啟動優化,關閉不需要使用的子產品
一個系統20%的功能往往能夠滿足80%的需求,MyEclipse也不例外,我們在大多數時候隻需要20%的系統功能,
是以可以将一些不使用的子產品禁止 加載啟動。
Window > Preferences > General > Startup andy Shutdown 在這裡列出的是MyEclipse啟動時加載的子產品
我這裡隻讓它加載tomcat5 勾選 MyEclipse EASIE Tomcat 5 。
怎樣才能知道哪些啟動項有用呢?我現在把我知道的啟動項用處說一下,還有很多不懂的,
希望大家懂的回複在下面 啊:
WTP :一個跟myeclipse差不多的東西,主要差别是 WTP 是免費的,如果使用myeclipse,這個可以取消
Mylyn:組隊任務管理工具,類似于 CVS ,以任務為機關管理項目進度,沒用到的可以取消
Derby:一種儲存成 jar 形式的資料庫,我沒用到,取消
一大排以 MyEclipse EASIE 打頭的啟動項:myeclipse 支援的伺服器,隻選自己用的,其他取消,
比如我隻選了 tomcat 。
(個人配置: MyEclipse EASIE隻保留tomcat6和Jboss7,其他的不動 )
十一、加大JVM的非堆記憶體
打開 myeclipse.ini
-startup
../Common\plugins\org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
--launcher.library
../Common\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.R34x_v20080731
-clean
-configuration
configuration
-vm
C:\Users\lenovo\AppData\Local\Genuitec\Common\binary\com.sun.java.jdk.win32.x86_1.6.0.013\jre\bin\client\jvm.dll
-vmargs
-Xmx384m
-XX:MaxPermSize=384m
-XX:ReservedCodeCacheSize=96m
以上是我的myeclipse.ini,需要修改是 -Xmx,-XX:MaxPermSize,-XX:ReservedCodeCacheSize,
将這三項的值調大,但并不是越大越好,曾經在相同的條件下做過測試(記憶體2GB),-Xmx,-XX:MaxPermSize的值為384m時比512m時要快(視具體的計算機而定),
-Xmx,-XX:MaxPermSize 的值設為同樣大小且兩者之和不能超出你的計算機本身的記憶體大小
十二、myeclipse10加入svn插件
說到插件,myeclipse自8.X開始,插件安裝就變得巨難用,通常最好還是用離線安裝,線上安裝很可能出問題,下面僅以SVN安裝為例,其他諸如ADT15,Aptana等都可采用
Java代碼

- import java.io.File;
- import java.util.ArrayList;
- import java.util.List;
- /**
- * MyEclipse9 插件配置代碼生成器
- */
- public class PluginConfigCreator
- {
- public PluginConfigCreator()
- {
- }
- public void print(String path)
- {
- List<String> list = getFileList(path);
- if (list == null)
- {
- return;
- }
- int length = list.size();
- for (int i = 0; i < length; i++)
- {
- String result = "";
- String thePath = getFormatPath(getString(list.get(i)));
- File file = new File(thePath);
- if (file.isDirectory())
- {
- String fileName = file.getName();
- if (fileName.indexOf("_") < 0)
- {
- print(thePath);
- continue;
- }
- String[] filenames = fileName.split("_");
- String filename1 = filenames[0];
- String filename2 = filenames[1];
- result = filename1 + "," + filename2 + ",file:/" + path + "/"
- + fileName + "\\,4,false";
- System.out.println(result);
- } else if (file.isFile())
- {
- String fileName = file.getName();
- if (fileName.indexOf("_") < 0)
- {
- continue;
- }
- int last = fileName.lastIndexOf("_");// 最後一個下劃線的位置
- String filename1 = fileName.substring(0, last);
- String filename2 = fileName.substring(last + 1, fileName
- .length() - 4);
- result = filename1 + "," + filename2 + ",file:/" + path + "/"
- + fileName + ",4,false";
- System.out.println(result);
- }
- }
- }
- public List<String> getFileList(String path)
- {
- path = getFormatPath(path);
- path = path + "/";
- File filePath = new File(path);
- if (!filePath.isDirectory())
- {
- return null;
- }
- String[] filelist = filePath.list();
- List<String> filelistFilter = new ArrayList<String>();
- for (int i = 0; i < filelist.length; i++)
- {
- String tempfilename = getFormatPath(path + filelist[i]);
- filelistFilter.add(tempfilename);
- }
- return filelistFilter;
- }
- public String getString(Object object)
- {
- if (object == null)
- {
- return "";
- }
- return String.valueOf(object);
- }
- public String getFormatPath(String path)
- {
- path = path.replaceAll("\\\\", "/");
- path = path.replaceAll("//", "/");
- return path;
- }
- public static void main(String[] args)
- {
- /*你的SVN的features 和 plugins複制後放的目錄*/
- String plugin = "F:\\MyEclipse10.0\\myEclipsePlugin\\svn";
- new PluginConfigCreator().print(plugin);
- }
- }