
一、工具优化以下为 MyEclipse 开发环境的基础优化设置涵盖编码、字体、插件等常用配置。修改当前工作区下所有项目编码Window-Preferences-General-Workspace-Text File Encoding改为UTF-8修改当前项目编码项目-右键-properties-Text File Encoding改为UTF-8增删工具栏图标Window-Customize Perspective调整字体文件内右键-Preferences-General-Appearance-Colors and Fonts修改默认打开视图Window-Preferences-General-Editor-File Associations-修改视图修改启动和关闭时加载的插件Window-Preferences-General-Startup and Shutdown修改最大行宽Window-Preferences-Java-Code Style-Formatter-Line Wrapping自带格式无法编辑必须新建修改Jsp编码Window-Preferences-Myeclipse-Files and Editors-Jsp的Encoding改为UTF-8恢复myeclipse默认设置File-Switch Workspace查看工作空间路径进入目录删除.metadata回复默认查看清理内存Myeclipse-Utilities-Show Heap Status代码补全提示Window-Preferences-Java-Editor-Content Assist修改Myeclipse的maven版本为自己下载的Window-Preferences-MyEclipse-Maven4MyEclipse-Installations同时修改用户配置Window-Preferences-MyEclipse-Maven4MyEclipse-User Settings将JRE版本改为默认Configure Build Path-Edit JRE Library-选Workspace Default JRE以防别人机子上的jdk版本不同添加自动提示Window-Preferences-Java-Editor-Content Assist-**** for java-在“.”后添加“”符号设置新建jsp默认编码Window-Preferences-MyEclipse-Files and Editors-JSP将tab替换为4个空格Window - Preferences - General - Editors - Text Editors选中“Inserts spaces for tabs”JDK不使用MyEclipse自带的JREWindow-Preferences-Java-Installed JREs-SearchMyeclipse 2013中去除derby安装目录\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info搜索derby注释整行加大Myeclipse中Console的显示行数Window-Preferences-Run/Debug-Console去掉对Limit console output的选择或者选择后设置buffer size值禁止Myeclipse自动弹出控制台Window-Preferences-Run/Debug-Console取消勾选 Show when program writes to standard out当console中有输出时弹出前的选项和 Show when program writes to standard error当console中有错误时弹出 前的选项Eclipse中查看当前工程的JDK编译版本项目-右键-properties-Java ComplierEclipse中查看/修改当前工程的JRE版本项目-右键-Run As-Run Configurations-Java Application-项目名-JREEclipse中查看/修改代码模板Window-Preferences-Java-Editor-Templates删除Server视图下的Myeclipse TomcatMyeclipse Tomcat-右键-Configure Server Connector-勾选Disable查看Myeclipse启动时默认的JVMJREWindow-Preferences-Help-about Myeclipse-Installation Details--vm 下的参数二、修改 MyEclipse 启动时默认的 JVMJRE以下为修改 MyEclipse 启动时默认 JVM 的三种方式直接把要使用的JRE文件夹拷贝到Eclipse目录下修改eclipse.ini文件添加-vm参数指定要运行的虚拟机的地址使用-vm命令行自变量例子-vm c:\jre\bin\javaw.exe修改MyEclipse或者Eclipse启动的快捷方式。在快捷方式上“右键”----“属性”例如默认情况下我的MyEclipse的快捷方式属性是目标D:\Program Files\MyEclipse 6.0\eclipse\eclipse.exe -vm d:\Program Files\MyEclipse 6.0\jre\bin\javaw.exe启始位置d:\Program Files\MyEclipse 6.0\eclipse只需要把目标的内容进行修改例如我修改为D:\Program Files\MyEclipse 6.0\eclipse\eclipse.exe -vm D:\Program Files\jdk1.6.0_24\bin\javaw.exe三、常用设置以下为 MyEclipse 日常开发中常用的项目与视图设置。修改Copy来的项目web路径名项目-右键-properties-MyEclipse-Project Facets- Web-Web Context-root添加User LibrariesWindow-Preferences-Java-Build Path-User Librariesmyeclipse验证jquery错误的问题jquery-1.8.0.min.js- 鼠标右键 - MyEclipse - manage validation - 左面点击 - Excluded resources - 找到jquery.js - 打上钩 - apply重新提示工作路径Myeclipse安装目录\configuration\.settings\org.eclipse.ui.ide.prefs 修改SHOW_WORKSPACE_SELECTION_DIALOGtrue或者Window-Preferences-General-Startup and Shutdown-Workspaces或Window-Preferences-Java-Java dialogs-Clear按钮如何查看MyEclipse包含的Eclipse的版本号打开安装目录下readme文件夹里的readme_eclipse.html文件或在控制台输入java -version将myeclipse自带类库中的某个jar包移除项目-右键-Build Path-Configure Build Path-选中需要修改的类库-Edit-勾选Enable project specific advanced configuration在package视图下用树形结构查看库点击左侧浏览视图的箭头-Package Presentation-Hierarchical隐藏当前工作环境中关闭的工程点击左侧浏览视图的箭头-Filters...-勾选Closed projects修改xml文件格式化时的最大行宽Window-Preferences-MyEclipse-Files and Editors-XML- XML Source-Line width取消拼写检查Window-Preferences-General-Editor-Spelling-取消勾选Enable spell checking前的复选框关闭Maven4Myeclipse插件在Myeclipse启动时updating indexesWindow Preferences Myeclipse Maven4Myeclipse取消勾选的Enable Maven4MyEclipse features四、快捷功能以下为 MyEclipse 中常用的快捷键操作。查看快捷键列表CtrlShiftL添加Import语句CtrlShiftM——(先把光标放在需导入包的类名上)整块向左缩进ShiftTab输出选中代码选中后按ALT/选择sysout快速编辑模式AltShiftA替换/查找选中范围的文本选中-CtrlF-勾选Scope内的Select Lines