2012-05-04 12:58 eclipse老是building workspace及自动更新问题,eclipse加速

本文提供了多种提高Eclipse IDE性能的方法,包括禁用自动编译、调整内存分配、减少启动插件数量等,帮助用户解决Eclipse运行缓慢的问题。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

最近用Eclipse开发oPhone的一个项目,每次打开Eclipse的时候,总是在build workspace,而且还老是build不完 ,因为没有build完,就无法保存,运行和调试,关闭程序则会没有反应,只能结束进程,这让我相当的郁闷. 1- eclipse 默认是自动编译的,你可以把project 下的build automaticaly 勾去掉,译成手动编译,这样可以减少系统的负荷,还有就是除了正在编辑的项目,其它的都关掉。2-在eclipse.ini式中添加了一个命令 -clean,给Eclipse清理一下 (windows+s键打开搜索,然后搜索eclipse.ini进行修改)3- 在Eclipse启动时(也就是在eclipse.ini中)加入参数: -vmargs -Xmx512M  ,Eclipse开始内存损耗比较小,但是后来消耗也大,注意及时清理并开大Eclipse内存。4-Window-->Preferences-->Install/Update-->Auto updates,取消自动更新5-Preferences -> General -> StartUp and Shutdown: 将除Plug-ins activated on startup以外的项目有节选的去掉(比如Mylyn等没用到,就去掉了,或者全部去掉)
Eclipse 加速  ( http://8376eric.blog.163.com/blog/static/93016932011101101829470/)

加大Eclipse运行可用最大内存数

具体操作: 修改位于eclipse目录下的eclipse.ini, 将-Xmx512m调高, 我的改成了-Xmx768m
  效果: 不祥.

减少Eclipse启动后自动启动的插件
  具体操作: 在Preferences -> General -> StartUp and Shutdown: 将除Plug-ins activated on startup以外的项目有节选的去掉(比如Mylyn等没用到,就去掉了)
  效果: 启动Eclipse后,会有Initialing Java Tools的滚动条,会发现快了很多.

减少编译需要验证的项目,提升编译速度
  具体操作: 在Preferences -> Validataion 将无关的Validator去掉, 比如: 我就将和我无关的JPA, JSP, WS 都去掉了.
  效果: 编译项目时,Eclipse跑的Validator项目少了, 确实快了.

关掉自动编译
  具体操作: Project -> Build Automatically
  效果: 在代码修改保存后,不会启动自动编译.

在Clean的时候,要注意选项
  具体操作: Project -> Clean
  注意: 在最下面有: Build the entire workspace 和 Build Only the selected Projects
要根据自己情况勾选, 因为是默认选择编译整个工作区.

显示内存使用情况(可手动GC)
  具体操作:Preference -> General -> Show heep status

保存自己的Perspective
  具体操作:1. Window -> Save Perspective As
            2. Preference -> Perspective -> Make Default 将自己刚刚创建的Perspective 或 自己常用的 设置成默认

关闭Server的自动发布
  具体操作:Server -> Publishing -> Never publish automatically

轻手轻脚
  慢慢操作, 莫急, 机器卡住了耐心等就好.

其他
  如果Eclipse卡住了,并且处于最小化模式,点击Windows上Eclipse的任务条再也无法使Eclipse最大化的时候,请在任务条上点击右键,使用最大化的菜单.

在Eclipse工作正欢的时候,请不要去惊扰它,非要去操作界面的话,先用鼠标在你要点击的控件上试试,看看控件是否活着,否则不要去打扰它. 等吧.

"C:\Program Files\Java\jdk-17\bin\java.exe" -Dmaven.multiModuleProjectDirectory=D:\workspace-pro\mall\font-mall-boot -Djansi.passthrough=true -Dmaven.home=D:\tools\apache-maven-3.8.4 -Dclassworlds.conf=D:\tools\apache-maven-3.8.4\bin\m2.conf "-Dmaven.ext.class.path=C:\Program Files\JetBrains\IntelliJ IDEA 2023.3.6\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA 2023.3.6\lib\idea_rt.jar=57046:C:\Program Files\JetBrains\IntelliJ IDEA 2023.3.6\bin" -Dfile.encoding=UTF-8 -classpath D:\tools\apache-maven-3.8.4\boot\plexus-classworlds-2.6.0.jar;D:\tools\apache-maven-3.8.4\boot\plexus-classworlds.license org.codehaus.classworlds.Launcher -Didea.version=2023.3.6 -s D:\tools\apache-maven-3.8.4\conf\settings.xml -Dmaven.repo.local=D:\tools\mvnRepo_1.1 -DskipTests=true com.spotify:docker-maven-plugin:1.2.2:build -P rdc,pre,!test [INFO] Scanning for projects... [WARNING] [WARNING] Some problems were encountered while building the effective model for com.reeji:font-mall-boot:jar:1.0-SNAPSHOT [WARNING] 'build.plugins.plugin.version' for org.springframework.boot:spring-boot-maven-plugin is missing. @ line 180, column 21 [WARNING] [WARNING] It is highly recommended to fix these problems because they threaten the stability of your build. [WARNING] [WARNING] For this reason, future Maven versions might no longer support building such malformed projects. [WARNING] [INFO] [INFO] ----------------------< com.reeji:font-mall-boot >---------------------- [INFO] Building font-mall-boot 1.0-SNAPSHOT [INFO] --------------------------------[ jar ]--------------------------------- [INFO] [INFO] --- docker-maven-plugin:1.2.2:build (default-cli) @ font-mall-boot --- [INFO] Using authentication suppliers: [ConfigFileRegistryAuthSupplier] [INFO] Copying D:\workspace-pro\mall\font-mall-boot\target\font-mall-boot-1.0-SNAPSHOT.jar -> D:\workspace-pro\mall\font-mall-boot\target\docker\font-mall-boot-1.0-SNAPSHOT.jar [INFO] Copying D:\workspace-pro\mall\font-mall-boot\target\classes\docker\Dockerfile -> D:\workspace-pro\mall\font-mall-boot\target\docker\Dockerfile [INFO] Building image font-mall-boot Step 1/11 : FROM eclipse-temurin:17 as builder ---> b6a94cd8215a Step 2/11 : WORKDIR /application ---> Using cache ---> 85dd450250cf Step 3/11 : ADD font-mall-boot/target/*.jar . [INFO] ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 2.091 s [INFO] Finished at: 2025-08-04T14:50:58+08:00 [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal com.spotify:docker-maven-plugin:1.2.2:build (default-cli) on project font-mall-boot: Exception caught: ADD failed: no source files were specified -> [Help 1] [ERROR] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging. [ERROR] [ERROR] For more information about the errors and possible solutions, please read the following articles: [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException Process finished with exit code 1
最新发布
08-05
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值