myeclipse java设置_Eclipse / MyEclipse 一些习惯设置和优化技巧

1、修改当前工作区下所有项目编码:Window->Preferences->General->Workspace->Text File Encoding改为UTF-8

2、隐藏工具栏图标:Window->Customize Perspective ->Tool Bar Visibility

3、修改字体:Window->Preferences->General->Appearance->Colors and Fonts

4、修改默认打开视图: Window->Preferences->General->Editor->File Associations->(修改视图)

5、将tab替换为4个空格:Window -> Preferences -> General -> Editors -> Text Editors,选中“Inserts spaces for tabs”

6、修改打开/关闭Eclipse时加载的插件和提示(解决卡顿):Window->Preferences->General->Startup and Shutdown

7、修改Java文件换行宽度:Window->Preferences->Java->Code Style->Formatter->new(内嵌样式无法编辑,必须新建)->选择Line Wrapping的Tab->Maximum line width;同时修改注释的最大行宽,选择Comments的Tab->Maximum line width for comments;

8、修改Jp文件换行宽度:Window->Preferences->Web->HTML Files->Editor->修改Formatting下的Line width

9、修改MyEclipse中Jsp默认编码:Window->Preferences->Myeclipse->Files and Editors->Jsp的Encoding改为UTF-8

10、修改Eclipse中Jsp默认编码:Window–>Preferences–>Web–>JSP Files->JSP-> Encoding

11、恢复Eclipse默认设置:进入Eclipse工作路径(通过File->Switch Workspace->Other...可知)->删除.metadata文件夹

12、MyEclipse监视内存状态:Myeclipse->Utilities->Show Heap Status

13、Eclipse监视内存状态:Window->Preferences->General->勾选Show heap status

14、代码补全自动提示:Window->Preferences->Java->Editor->Content Assist->Auto activation triggers for java

15、MyEclipse使用外部maven:Window–>Preferences–>MyEclipse–>Maven4MyEclipse–>Installations;同时修改用户配置:Window–>Preferences–>MyEclipse–>Maven4MyEclipse–>User Settings

16、Eclipse使用外部maven:Window–>Preferences–>Maven–>Installations;同时修改用户配置:Window–>Preferences–>Maven–>User Settings

17、将JRE版本改为默认:Configure Build Path->Edit JRE Library->选Workspace Default JRE(以防别人机子上的jdk版本不同)

18、JDK不使用MyEclipse自带的JRE:Window->Preferences->Java->Installed JREs->Search

19、Myeclipse 2013中去除derby:安装目录\configuration\org.eclipse.equinox.simpleconfigurator\bundles.info,搜索derby注释整行

20、加大Myeclipse中Console的显示行数:Window->Preferences->Run/Debug->Console,去掉对Limit console output的选择,或者选择后设置buffer size值

21、禁止Myeclipse自动弹出控制台:Window->Preferences->Run/Debug->Console,取消勾选 Show when program writes to standard out(当console中有输出时弹出)前的选项和 Show when program writes to standard error(当console中有错误时弹出) 前的选项

22、Eclipse中查看当前工程的JDK(编译)版本:项目->右键->properties->Java Complier

23、Eclipse中查看/修改当前工程的JRE版本:项目->右键->Run As->Run Configurations->Java Application->项目名->JRE

24、Eclipse中查看/修改代码模板:Window->Preferences->Java->Editor->Templates

25、删除Server视图下的Myeclipse Tomcat:Myeclipse Tomcat->右键->Configure Server Connector->勾选Disable

26、修改JVM最大可用内存:eclipse安装目录->打开eclipse.ini->修改-Xmx值

27、查看Myeclipse启动时默认的JVM(JRE):Window->Preferences->Help->about Myeclipse->Installation Details->-vm 下的参数

28、修改Myeclipse启动时默认的JVM(JRE):

①直接把要使用的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"

29、修改Copy来的项目web路径名:项目->右键->properties->MyEclipse–>Project Facets-> Web->Web Context-root

30、添加User Libraries:Window->Preferences->Java->Build Path->User Libraries

31、Myeclipse验证jquery错误的问题:jquery-1.8.0.min.js-> 鼠标右键 -> MyEclipse -> manage validation -> 左面点击 -> Excluded resources -> 找到jquery.js -> 打上钩 -> apply

32、重新提示工作路径:Myeclipse安装目录\configuration\.settings\org.eclipse.ui.ide.prefs ,修改SHOW_WORKSPACE_SELECTION_DIALOG=true或者Window->Preferences->General->Startup and Shutdown->Workspaces

或Window->Preferences->Java->Java dialogs->Clear按钮

33、查看MyEclipse包含的Eclipse的版本号:打开安装目录下readme文件夹里的readme_eclipse.html文件或在控制台输入java -version

34、将Myeclipse自带类库中的某个jar包移除:项目->右键->Build Path->Configure Build Path->选中需要修改的类库->Edit->勾选Enable project specific advanced configuration

35、在package视图下用树形结构查看库:点击左侧浏览视图的箭头->Package Presentation->Hierarchical

36、隐藏当前工作环境中关闭的工程:点击左侧浏览视图的箭头->Filters...->勾选Closed projects

37、修改xml文件格式化时的最大行宽:Window–>Preferences–>MyEclipse–>Files and Editors->XML-> XML Source->Line width

38、关闭拼写检查:Window->Preferences->General->Editor->Text Editors->Spelling->取消勾选Enable spell checking前的复选框

39、关闭Maven4Myeclipse插件在Myeclipse启动时updating indexes:Window => Preferences => Myeclipse=> Maven4Myeclipse取消勾选的Enable Maven4MyEclipse features

40、Eclipse设置new菜单的内容:Window->Customize Perspective->Menu Visibility->File->New

41、xml自动提示:Window–>Preferences–>MyEclipse–>Files and Editors->XML-> XML Files-> XML Catalog,选择Key type为URI,其他类似下面——

key: http://struts.apache.org/dtds/struts-2.0.dtd

location: 对应的dtd文件,位于struts-core包中,解压开,指定相应位置,如:D:\share\0750_Struts2.1.6\soft\struts-2.1.6\lib\struts2-core-2.1.6\struts-2.0.dtd

42、在本源文件中高亮显示相同的字符串:Java->Editor->Mark Occurrences->勾选Mark occurrences of the selected element in the current file

欢迎来到技术之家,

如需转载,烦请保留本文链接和出处:http://www.jszja.com/contents/14/1728.html

您的支持将是我们前进的动力!如对本篇文章有疑问或建议,请通过本站下方邮箱联系我们,让技术之家每天进步一点点!(●'◡'●)

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值