Eclipse使用过程的一些配置、错误等的总结记录

来源:互联网 发布:汉译英好用的翻译软件 编辑:程序博客网 时间:2024/05/23 01:22
背景:
公司项目使用jdk1.6、tomcat7、SVN,本文总结使用到现在的一些配置和问题。

1、Eclipse项目配置:
(1)Windows -> Preferences -> Java/Installed JREs:
   JRE home: C:\Program Files (x86)\Java\jdk1.6.0_33
   JRE name:jdk1.6.0_33
(2)底部视图加上Ant
   Winodws -> Show View -> Other.. -> Ant -> OK -> 把项目build.xml拖到Ant上。   

2、Eclipse中修改SVN用户名和密码
来源:http://www.cnblogs.com/exmyth/p/4446665.html
(1)查看你的Eclipse 中使用的是什么SVN Interface 
windows > preference > Team > SVN > SVN Interface 
(2)如果是用的JavaHL, 找到以下目录并删除auth目录下的文件. 
  Windows 7
  C:\Users\"你的用户名"\AppData\Roaming\Subversion\auth\
  XP
  C:\Documents and Settings\"你的用户名"\Application Data(隐藏文件夹)\"Subversion\auth"  
(3) 如果你用的SVNKit, 找到以下目录并删除.keyring文件. 
[eclipse ]"configuration"org.eclipse .core.runtime 

3、SVN忽略classes、release、bin
(1)打开repository browser(在资源管理器中输入svn:\\,回车后输入URL地址),删除里面classes、release的子目录
(2)删除本地电脑里面classes、release的子目录所有文件,右键点击这些子目录,team -> 添加至svn:ignore。
(3)Eclipse ->window->preferences->team->Ignored Resource->Add Pattern->
如忽略realse文件夹,就Add Pattern,填入*/realse/*
如忽略bin文件夹,就Add Pattern,填入*/bin/*
如忽略.class类型文件,填入*.class

4、eclipse调试时断点频繁停在threadpoolexecutor
解决:
Eclipse->Window->Preferences->Java->Debug,去掉"Suspend execution on uncaught exceptions"

5、eclipse导入项目以后,内容没有错误,项目上却有个小红叉
解决:
Problems选项卡会有详细的错误描述,如果被关闭了的话,重新打开方法:
Eclipse->Window->Show View->Other->Problems。

6、错误提示:The method of type must override asuperclass
解决:
Windows->Preferences->Java->Compiler,在右边的Compiler compliance level 修改版本为 1.6
项目右键->build path->configure build path->java Compiler->Compiler compliance level 修改版本为 1.6

7、错误提示:Java compiler level does not match the version of the installed Java project facet
解决:
右键项目Properties->Properties->Project Facets->Project Facets->“Java”下拉列表中选择相应版本

8、Eclipse几个常用快捷键
查找内容:ctrl + h
查找文件:ctrl + shift + r
格式化代码:ctrl + shift + F
添加“/”注释:ctrl + /
添加“/**/”注释:ctrl + shift + /
删除行:ctrl + d
竖向选择(开启、关闭):alt + shift + a
重命名方法等:alt + shift + r



阅读全文
0 0