反复出现的日食

时间:2012-01-17 22:00:38

标签: eclipse

我用eclipse做php开发。我最近开发了一个IDE挂起的问题,每当我打开eclipse时立即返回挂起。它说它正在“正在初始化Java工具。我在多个版本中重新安装了java和eclipse。我删除了我的工作区。我最终删除了工作区并对我的项目进行了新的检查,然后它再次开始工作。

好的,所以项目搞砸了。精细。我得到了重置,创建了一些我需要使用本地服务器(.user.ini和php文件)从开发目录运行项目的文件,并且能够运行它并进行一些更改。一切正常。我添加了几个文件,并注意到我手动创建的文件没有显示在包资源管理器中,所以我在根级别刷新....它挂起。

我最终杀了应用程序并重新启动我仍然可以使用我打开的一个文件,但每当我重新打开项目目录时它就会挂起。我删除了工作区,并尝试从现有源重新创建项目,但在进入源目录并点击下一步后,它会挂起。

我是否对项目目录做了一些会导致eclipse挂起的事情?

6 个答案:

答案 0 :(得分:30)

首先尝试清理项目并查看它是否为您解决了问题。

如果没有备份.metadata文件夹(以防你需要还原)并删除以下目录:

YOUR_WORKSPACE_HOME/.metadata/.plugins/org.eclipse.core.resources/.project

YOUR_WORKSPACE_HOME/.metadata/.plugins/org.eclipse.core.resources/.projects

重启Eclipse 问题应该解决。

在其他解决方案浪费了几个小时后,它为我解决了问题..

答案 1 :(得分:11)

对我来说,我通过授予eclipse管理员权限并使用以下命令在cmd中启动eclipse来修复它:

eclipse.exe -clean -clearPersistedState

答案 2 :(得分:6)

原来问题是eclipse正在处理我已配置为存在于项目根目录中的sessions目录。每当我刷新树时,它都会处理所有会话文件,这些文件显然已经足够用了10多分钟。怪异。

在告诉eclipse排除它之后,一切都很好。

更新

如果你遇到了同样的问题,那么在eclipse中你应该能够看到一个充满数百或数千个文本文件的目录。 Eclipse将尝试处理它们。要告诉它不要,右键单击该项目,然后单击properties -> resource -> resource filters。添加名称与文件夹名称匹配的排除所​​有规则。您可能还想对任何.svn文件夹等执行此操作。

答案 3 :(得分:1)

如果需要帮助,请进入工作区,查找.metadata目录,然后获取.log文件并上传。您可能会更好地从Eclipse论坛获取响应 - http://www.eclipse.org/forums/index.php/f/85/

我最好的猜测是,有一些插件导致了问题,并将状态存储在.metadata目录中的某个地方,但是没有更多的信息,我无法分辨出什么。我一直在Eclipse中进行PHP开发,并且我没有遇到过这种类型的问题,尽管我遇到了类似于我曾经尝试过的一些非常棘手的SVN设置。

答案 4 :(得分:0)

我已经和Eclipse有一些相关的问题了几个星期了。就我而言,我正在尝试在PC和Mac上开发一个PHP项目,并且发现Eclipse变得非常迟缓,然后在两台机器上完全挂起。在处理JavaScript文件时,这种行为似乎特别糟糕,但并不局限于此。我尝试了各种版本的Eclipse以及32位和64位版本,无法绕过它。

最终,删除项目(.project,.settings,.buildpath)并重新创建它似乎已经解决了我的问题。 (注意,我的项目不存储在我的工作区文件夹中,而是存储在网络驱动器的其他位置。)

我知道这不是对上述问题的直接回答,这个问题现在有点老了,但标题与我所经历的一致,所以我把它扔到那里以防万一其他人偶然发现它在一个黑暗的时刻!

答案 5 :(得分:0)

不确定在哪里发布:需要一个通用的" Eclipse Hanging"线程!

在启动后的几分钟到几分钟之后,我的问题是Eclipse挂起(在Windows上)。

查看日志文件" workspace.metadata.log",只指向错误的方向(删除指向的随机插件) 堆栈跟踪)。

通过首先查看EventVwr,我本可以省去很多麻烦,因为它原来是一个权限问题:

"%USERPROFILE%\AppData\Local\Microsoft\Windows\WebCache"

以下是EventVwr中出现的错误:

taskhost (2404) WebCacheLocal: An attempt to open the file
"C:\Users\Malcolm.Boekhoff\AppData\Local\Microsoft\Windows\WebCache\V01.chk"
for read / write access failed with system error 5 (0x00000005): "Access is denied. ".
The open file operation will fail with error -1032 (0xfffffbf8).

具体来说,检查" V01.log"的权限。文件:

icacls "%USERPROFILE%\AppData\Local\Microsoft\Windows\WebCache" /T

通过添加完全访问权限来修复它:

icacls "%USERPROFILE%\AppData\Local\Microsoft\Windows\WebCache" /T /Q /C /GRANT "%USERDOMAIN%\%USERNAME%:F"

进一步阅读:

以下是我尝试感谢Google的时间浪费的尴尬列表。他们都没有工作:

- Disable: "Code Recommendations"
- Disable: "General"."Notifications" (used to be under "Mylyn")
- Disable: "Install/Update"."Automatic Updates"
- Disable: "Java"."Code Coverage"
- Disable: "News": "Preferences"."General"
- Remove the "org.eclipse.rse.*.jar" files, except for "org.eclipse.rse.shells.ui_3.0.500.201403271554.jar", from the "plugins" directory.
- Remove all maven jars
- Remove all gradle jars
- Specify: "-Declipse.log.level=ALL" in VM args (I think I forgot to also specify "-debug")
- etc.

如果有人有兴趣,这是我的eclipse命令行:

start "eclipse" /max "c:\eclipse-jee-oxygen-1a-win32-x86_64\eclipse\eclipse" -nosplash -clean -consoleLog -debug -data "c:\eclipse-jee-oxygen-1a-win32-x86_64\workspace" -product "org.eclipse.epp.package.jee.product" -vm "c:/Program Files/Java/jdk1.8.0_121/bin/java" "-vmargs" "-Declipse.log.level=ALL" "-Xmx2048m"

以下是使用" bin / java"时看到的java控制台日志。 (如上所述)而不是" bin / javaw":

Install location:
    file:/c:/eclipse-jee-oxygen-1a-win32-x86_64/eclipse/
Configuration file:
    file:/c:/eclipse-jee-oxygen-1a-win32-x86_64/eclipse/configuration/config.ini loaded
Configuration location:
    file:/c:/eclipse-jee-oxygen-1a-win32-x86_64/eclipse/configuration/
Framework located:
    file:/c:/eclipse-jee-oxygen-1a-win32-x86_64/eclipse/plugins/org.eclipse.osgi_3.12.50.v20170928-1321.jar
Loading extension: reference:file:org.eclipse.osgi.compatibility.state_1.1.0.v20170516-1513.jar
        eclipse.properties not found
Framework classpath:
    file:/c:/eclipse-jee-oxygen-1a-win32-x86_64/eclipse/plugins/org.eclipse.osgi_3.12.50.v20170928-1321.jar
    file:/c:/eclipse-jee-oxygen-1a-win32-x86_64/eclipse/plugins/
    file:/c:/eclipse-jee-oxygen-1a-win32-x86_64/eclipse/plugins/org.eclipse.osgi.compatibility.state_1.1.0.v20170516-1513.jar
Debug options:
    file:/c:/mcb/religare/work/.options not found
Time to load bundles: 32
org.eclipse.m2e.logback.configuration: The org.eclipse.m2e.logback.configuration bundle was activated before the state location was initialized.  Will retry aft
er the state location is initialized.
Starting application: 5075
org.eclipse.m2e.logback.configuration: Logback config file: C:\eclipse-jee-oxygen-1a-win32-x86_64\workspace\.metadata\.plugins\org.eclipse.m2e.logback.configura
tion\logback.1.8.2.20171007-0217.xml
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [bundleresource://1008.fwk985397764:1/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [bundleresource://1008.fwk985397764:2/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [ch.qos.logback.classic.util.ContextSelectorStaticBinder]
org.eclipse.m2e.logback.configuration: Initializing logback
Application Started: 10507
# !SESSION 2017-10-20 13:07:49.562
# version: 1.1
# verbose: true
# The following option strings are specified for this debug session:
| main | 2017-10-20 13:07:49.562 | org.eclipse.e4.ui.workbench | /debug | org.eclipse.e4.ui.internal.workbench.WorkbenchLogger | trace | 158 | Ignored attempt t
o set focus during set focus for: org.eclipse.ui.internal.e4.compatibility.CompatibilityView@23f31375 |

另外,使用" -debug",你得到一个文件" trace.log"在.metadata目录中(但没有" .log"文件,即使使用" ALL"):

# !SESSION 2017-10-20 13:07:49.562
# version: 1.1
# verbose: true
# The following option strings are specified for this debug session:
| main | 2017-10-20 13:07:49.562 | org.eclipse.e4.ui.workbench | /debug | org.eclipse.e4.ui.internal.workbench.WorkbenchLogger | trace | 158 | Ignored attempt to set focus during set focus for: org.eclipse.ui.internal.e4.compatibility.CompatibilityView@23f31375 |
| main | 2017-10-20 13:09:47.775 | org.eclipse.e4.ui.workbench | /debug | org.eclipse.e4.ui.internal.workbench.WorkbenchLogger | trace | 158 | Ignored attempt to set focus during set focus for: org.eclipse.ui.internal.e4.compatibility.CompatibilityView@d7b38cf |
| main | 2017-10-20 13:09:49.555 | org.eclipse.e4.ui.workbench | /debug | org.eclipse.e4.ui.internal.workbench.WorkbenchLogger | trace | 158 | Ignored attempt to set focus during set focus for: org.eclipse.ui.internal.e4.compatibility.CompatibilityView@d7b38cf |