`
bestwinner
  • 浏览: 19006 次
  • 性别: Icon_minigender_1
  • 来自: 黄冈
社区版块
存档分类
最新评论

eclipse配置

 
阅读更多

一.Eclipse中查看JDK类库的源代码

1.点 “window”-> "Preferences" -> "Java" -> "Installed JRES"

2.此时"Installed JRES"右边是列表窗格,列出了系统中的 JRE 环境,选择你的JRE,然后点边上的 "Edit...", 会出现一个窗口(Edit JRE)

3.选中rt.jar文件的这一项:“c:\program files\java\jre_1.5.0_06\lib\rt.jar”
点 左边的“+” 号展开它,

4.展开后,可以看到“Source Attachment:(none)”,点这一项,点右边的按钮“Source Attachment...”, 选择你的JDK目录下的 “src.zip”文件

5.一路点"ok",结束。

dt.jar是关于运行环境的类库,主要是swing的包
tools.jar是关于一些工具的类库
rt.jar包含了jdk的基础类库,也就是你在java doc里面看到的所有的类的class文件

 

二.eclispe设置字体
window--preferences--General--appearance--colors and fonts--java--"java editor text font"
设为Courier New字体
 
三.eclipse中设置编码
1.project->properties->resource
2.window->preferences->general->workspace
3.Run ->run configurations->common
还有就是window->preferences->general->content types也可以设置。
 
四.去掉F2提示
1.点 “window”-> "Preferences" -> Java->edit->hovers
2.不勾Combined hovers
 

五.eclipse 注释内容颜色修改

window--preference-java-editor-syntax coloring-comments里面的前两个改颜色

 

六.Eclipse颜色设置

以下摘自:

http://blog.csdn.net/tt_zhang/article/details/7585586

 

颜色的设置主要有以下几个地方:

1.Windows -> Preferences -> General -> Appearance -> Colors and Font

      basic -> Text Font

      这里可以设置字体

2.Windows -> Preferences -> General -> Editors -> Text Editors

      Line number foreground行号前景色设置
      Current line highlight当前行高亮颜色设置
      Print margin打印页边距颜色设置
      Find scope查找作用域颜色设置
      Selection foreground color选择的内容的前景色设置
      Selection background color选择的内容的背景色设置
      Background color背景色设置
      Foreground color前景色设置
      Hyperlink超链接颜色设置

3.Windows -> Preferences -> General -> Editors -> Text Editors -> Annotations

       这里设置注释相关的颜色

4.Windows -> Preferences -> Java -> Editor -> Syntax Coloring

       这里是设置的重头戏,大部分的语法颜色都在这设置

       要逐项的细细查看

5.Windows -> Preferences -> Java -> Editors -> Properties Files Editor

      Properties文件颜色设置

6.windows-> preferences->java->Editor->Mark Occurences

      这里是高亮显示相同的变量的设置位置,颜色设置在

       Windows -> Preferences -> General -> Editors -> Text Editors -> Annotations -> Occurrences

7.Windows -> Preferences -> Run/Debug

       Run/Debug相关设置,输出控制台的颜色设置在下面的Console子项

 

 

eclipse 运行调优(JVM参数配置)


http://blog.csdn.net/lhooouuu/article/details/7220721

--1.设置最大的堆和最小堆大小.两者一样表示固定大小.这样可以防止老年代内存扩展造成额外的gc.

当然也会多占一些内存.系统内存不足的慎用

-Xms512m

-Xmx512m

--加大年轻代内存.减少minor gc

-Xmn164m

--这个是永久代大小.默认是64M,增加到96M.固定大小,减少扩展造成的gc

-XX:PermSize=96m

-XX:MaxPermSize=96m

--去除字节码验证

-Xverify:none

--屏蔽显示调用gc.

-XX:+DisableExplicitGC

--关闭类垃圾回收,就可以消除由于多次装入和卸装同一个类而造成的开销

-Xnoclassgc

--指定最适合多任务并行的CMS垃圾收集器

-XX:+UseParNewGC

-XX:+UseConcMarkSweepGC

--修改默认的触发老年代full gc的内存所占比..改成85%

-XX:CMSInitiatingOccupancyFraction=85

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics