MyEclipse、Eclipse使用配置及部分问题

 

简单总结一下myeclipse首次使用的配置,eclipse类似。总结的不是很全面,如有新的看法,欢迎下方留言。

myeclipse

最优设置

1、myeclipse激活

myeclipse、eclipse程序及激活工具下载:点我 。激活后查看 myeclipse-subscription information是否成功。

2、设置字符编码

window -> Preferences -> general -> Workspace -> Text file encoding选择Other,将新建工程属性编码改变为UTF-8。

window -> Preferences -> general -> Content Types选择Text树,点开,选择Java Source File。在下面的Default encoding输入框中输入UTF-8,按下Update按钮,则设置Java文件编码为UTF-8。

3、字体大小 背景颜色设置

window -> Preferences -> general -> appearance -> colors and fonts -> basic 最后fonts一项,设置,字体大小为12

window -> Preferences -> general -> editors -> text Editors ->background colors 去掉对勾,设为护眼绿。修改 R: 204 G: 232 B: 207  或者 色调:85;饱和度:123;亮度:205即可

4、设置自动提示

Windows→Preferences→Java→Editor→Content Assist;修改Auto Activation triggers for java的值为:.abcdefghijklmnopqrstuvwxyz(,

5、设置java源码

windows--preferences--Java--installed jres --选中jre6--点击右边的edit--选中jre6/lib/rt.jar

点击右边的 source attachment configuration -- external file selection --找到你的jdk下的src.zip文件,选择添加即可

6、添加jre运行环境、tomcat服务器

在搜索框搜索installed JREs 、Tomcat。添加相关文件到myeclipse上。

7、设置创建JSP页面默认编码设为UTF-8

Window -> Preferences -> MyEclipse -> Files and Editors -> JSP,将"Encoding"选为"ISO10646/Unicode(UTF-8)

8、关闭自动更新:

  • Eclipse:首先进入Windows –> Perferences–> Install/Update -> Automatic Updates,不要勾选"Automatically find new updates and notify me"。
  • Myeclipse:

Windows –> Perferences–> MyEclipse... -> Maven4MyEclipse,不要勾选"Download repository index updates on startup" 。

9、插件的添加方法

首先下载多个插件,解压到本地。在myeclipse的dropins文件夹新建link文件, 如svn.link abc.link;svn.link内容为 path=D:\\MyEclipse\\svn;abc.link内容为 path=D:\\MyEclipse\\abc

10、添加快捷注释

通过菜单 Window->Preference ->Java -> Code Style -> Code Templates  修改Types 如下

  1. /**
  2. * @ClassName: ${type_name}
  3. * @description:
  4. * @author: ${user}
  5. * @date ${date} ${time}
  6. * ${tags}
  7. */

修改Methods,如下

  1. /**
  2. * @title: ${enclosing_method}
  3. * @description:
  4. * @author: ${user}
  5. * @date ${date} ${time}
  6. * ${tags}
  7. */

Eclipse快捷键:选中你的方法  Alt+Shift+J

常见问题

1、从外部导入工程到myeclipse8.5报错:Background Indexer Crash Recovery java.lang

  • Help > MyEclipse Configuration Center > Dashboard tab
  • 在Add-ons下取消勾选:"MyEclipse IE Javascript Debugger (Windows Only)"
  • 重启 在右下方的挂起面板(Pending Changes)选择:Apply 1 change 稍等···

2、关于JPEGImageEncoder报错的问题

修改Windows-Preferences-Java-Compiler-Errors/Warnings里面的Deprecated and restricted API中的Forbidden references(access rules)选为Warning就可以编译通过了,是eclipse的设置问题。

3、org.apache.jasper.JasperException: Unable to compile class for JSP

【Window】->【Preferences】->【Java】->【Compiler】->【JDK Compliance level】->1.4调高到1.6编译版本

将项目和tomcat下的web->web->web-info->lib中的jsp-api.jar和servlet-api.jar删除,重启服务器,重新运行

4、SVN同步时忽略某些文件类型和文件夹

打开:window-->preferences-->team-->Ignored Resource-->Add Pattern  忽略文件夹:
如忽略target文件夹,就Add Pattern,填入*/target/*  忽略文件:如忽略.class类型的,直接填入 .class

5、怎么关闭MyEclipse的.html .jsp的可视化编辑器

选择菜单windows -> preferences->General-> Editors -> File Associations

在上方框内选择*.jsp(或*.html),在下方框内选择MyEclipse JSP Editor(或MyEclipse html Editor),按Default即可

6、BASE64Encoder类使用报错

检查jre环境是否为本机安装的jdk1.6,1.7或1.8,更换sun jdk为本机安装额oracle jdk即可。或者右键项目-》属性-》java bulid path-》jre System Library-》access rules-》resolution选择accessible,下面填上** 点击确定即可!!

猜你喜欢

转载自www.cnblogs.com/chen-hai-jia/p/9953245.html
今日推荐