Eclipse 在启动时挂起

发布于 2024-12-01 23:42:49 字数 4016 浏览 0 评论 0原文

当我的电池耗尽时,我正在使用我的 Macbook。现在 Eclipse 拒绝启动,卡在“正在加载工作台”上。底部的堆栈跟踪是在挂起一分钟左右后按 ^C 得出的。

~/Downloads/eclipse$ ./Eclipse.app/Contents/MacOS/eclipse -clean -debug -consolelog 
Start VM: -Dosgi.requiredJavaVersion=1.5
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Xms40m
-Xmx256m
-XX:MaxPermSize=256m
-Dorg.eclipse.swt.internal.carbon.smallFonts
-clean
-Djava.class.path=/Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
-os macosx
-ws carbon
-arch x86
-showsplash
-launcher /Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/eclipse
-name Eclipse
--launcher.library /Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS//../../../plugins/org.eclipse.equinox.launcher.carbon.macosx_1.0.101.R34x_v20080731/eclipse_1115.so
-startup /Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
-clean
-debug
-consolelog
-vm /System/Library/Frameworks/JavaVM.framework
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Xms40m
-Xmx256m
-XX:MaxPermSize=256m
-Dorg.eclipse.swt.internal.carbon.smallFonts
-clean
-Djava.class.path=/Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar 
Install location:
    file:/Users/admin/Downloads/eclipse/
Configuration file:
    file:/Users/admin/Downloads/eclipse/configuration/config.ini loaded
Configuration location:
    file:/Users/admin/Downloads/eclipse/configuration/
Framework located:
    file:/Users/admin/Downloads/eclipse/plugins/org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
Framework classpath:
    file:/Users/admin/Downloads/eclipse/plugins/org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
Splash location:
    /Users/admin/Downloads/eclipse/plugins/org.eclipse.platform_3.3.101.v200902111700/splash.bmp
Debug options:
    file:/Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/.options not found
Time to load bundles: 16
Starting application: 3649
!SESSION 2011-08-30 18:03:17.958 -----------------------------------------------
eclipse.buildId=M20090211-1700
java.version=1.6.0_26
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86, WS=carbon, NL=en_US
Command-line arguments:  -os macosx -ws carbon -arch x86 -clean -debug -consolelog

!ENTRY org.eclipse.core.resources 2 10035 2011-08-30 18:03:22.073
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.tigris.subversion.clientadapter.javahl 1 0 2011-08-30 18:03:22.782
!MESSAGE Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = .:/Users/admin/Library/Java/Extensions:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
^C
Exception in thread "Thread-1" org.eclipse.swt.SWTException: Invalid thread access
    at org.eclipse.swt.SWT.error(SWT.java:3777)
    at org.eclipse.swt.SWT.error(SWT.java:3695)
    at org.eclipse.swt.SWT.error(SWT.java:3666)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:681)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:341)
    at org.eclipse.swt.widgets.Shell.getShells(Shell.java:885)
    at org.eclipse.swt.widgets.Shell.kEventWindowHidden(Shell.java:1213)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2044)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4171)
    at org.eclipse.equinox.launcher.JNIBridge._takedown_splash(Native Method)
    at org.eclipse.equinox.launcher.JNIBridge.takeDownSplash(JNIBridge.java:110)
    at org.eclipse.equinox.launcher.Main.takeDownSplash(Main.java:1863)
    at org.eclipse.equinox.launcher.Main$SplashHandler.run(Main.java:106)

有什么想法吗?如果没有其他建议,我想我会尝试安装 JavaHL。 Eclipse总是抱怨它,但它总是在之前启动。

I was working on my Macbook, when my battery ran out. Now Eclipse refuses to start, getting stuck on "Loading Workbench". The stacktrace in the bottom is from pressing ^C after a minute or so of hanging.

~/Downloads/eclipse$ ./Eclipse.app/Contents/MacOS/eclipse -clean -debug -consolelog 
Start VM: -Dosgi.requiredJavaVersion=1.5
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Xms40m
-Xmx256m
-XX:MaxPermSize=256m
-Dorg.eclipse.swt.internal.carbon.smallFonts
-clean
-Djava.class.path=/Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
-os macosx
-ws carbon
-arch x86
-showsplash
-launcher /Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/eclipse
-name Eclipse
--launcher.library /Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS//../../../plugins/org.eclipse.equinox.launcher.carbon.macosx_1.0.101.R34x_v20080731/eclipse_1115.so
-startup /Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar
-clean
-debug
-consolelog
-vm /System/Library/Frameworks/JavaVM.framework
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Xdock:icon=../Resources/Eclipse.icns
-XstartOnFirstThread
-Xms40m
-Xmx256m
-XX:MaxPermSize=256m
-Dorg.eclipse.swt.internal.carbon.smallFonts
-clean
-Djava.class.path=/Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/../../../plugins/org.eclipse.equinox.launcher_1.0.101.R34x_v20081125.jar 
Install location:
    file:/Users/admin/Downloads/eclipse/
Configuration file:
    file:/Users/admin/Downloads/eclipse/configuration/config.ini loaded
Configuration location:
    file:/Users/admin/Downloads/eclipse/configuration/
Framework located:
    file:/Users/admin/Downloads/eclipse/plugins/org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
Framework classpath:
    file:/Users/admin/Downloads/eclipse/plugins/org.eclipse.osgi_3.4.3.R34x_v20081215-1030.jar
Splash location:
    /Users/admin/Downloads/eclipse/plugins/org.eclipse.platform_3.3.101.v200902111700/splash.bmp
Debug options:
    file:/Users/admin/Downloads/eclipse/Eclipse.app/Contents/MacOS/.options not found
Time to load bundles: 16
Starting application: 3649
!SESSION 2011-08-30 18:03:17.958 -----------------------------------------------
eclipse.buildId=M20090211-1700
java.version=1.6.0_26
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86, WS=carbon, NL=en_US
Command-line arguments:  -os macosx -ws carbon -arch x86 -clean -debug -consolelog

!ENTRY org.eclipse.core.resources 2 10035 2011-08-30 18:03:22.073
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.tigris.subversion.clientadapter.javahl 1 0 2011-08-30 18:03:22.782
!MESSAGE Failed to load JavaHL Library.
These are the errors that were encountered:
no libsvnjavahl-1 in java.library.path
no svnjavahl-1 in java.library.path
no svnjavahl in java.library.path
java.library.path = .:/Users/admin/Library/Java/Extensions:/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
^C
Exception in thread "Thread-1" org.eclipse.swt.SWTException: Invalid thread access
    at org.eclipse.swt.SWT.error(SWT.java:3777)
    at org.eclipse.swt.SWT.error(SWT.java:3695)
    at org.eclipse.swt.SWT.error(SWT.java:3666)
    at org.eclipse.swt.widgets.Widget.error(Widget.java:681)
    at org.eclipse.swt.widgets.Widget.checkWidget(Widget.java:341)
    at org.eclipse.swt.widgets.Shell.getShells(Shell.java:885)
    at org.eclipse.swt.widgets.Shell.kEventWindowHidden(Shell.java:1213)
    at org.eclipse.swt.widgets.Widget.windowProc(Widget.java:2044)
    at org.eclipse.swt.widgets.Display.windowProc(Display.java:4171)
    at org.eclipse.equinox.launcher.JNIBridge._takedown_splash(Native Method)
    at org.eclipse.equinox.launcher.JNIBridge.takeDownSplash(JNIBridge.java:110)
    at org.eclipse.equinox.launcher.Main.takeDownSplash(Main.java:1863)
    at org.eclipse.equinox.launcher.Main$SplashHandler.run(Main.java:106)

Any ideas? I guess I will try installing JavaHL if there are no other suggestions. Eclipse always complained about it, but it always started up before.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(8

梦年海沫深 2024-12-08 23:42:49

大多数解决方案都会删除或更改元数据,不幸的是,这通常会从项目中删除 SVN 和库信息,这是一个重大的时间损失。

我找到了一个命令行开关(请参阅 https://bugs.eclipse.org/bugs/show_bug.cgi? id=389738),清除任何保存的状态(打开的窗口等),这通常会导致启动挂起:-clearPersistedState。

我现在输入一整套选项:

  • 在终端中,输入 /eclipse -clean -refresh -debug -consolelog -clearPersistedState
  • 打开导致问题的工作区
  • 等待 eclipse完全启动并准备就绪,然后关闭它并正常重新启动

总是为我解决启动问题。

Most solutions delete or alter the metadata, unfortunately this often removes SVN and library information from projects which is a major time-loss.

I have found a commandline switch (See https://bugs.eclipse.org/bugs/show_bug.cgi?id=389738) that clears any saved state (open windows and such) which usually cause startup hangs: -clearPersistedState.

I throw in a whole range of options now:

  • In a terminal, type <eclipse dir>/eclipse -clean -refresh -debug -consolelog -clearPersistedState
  • Open the workspace that causes the issue
  • Wait until eclipse is fully started and ready, then close it and start it again normally

This always solves startup issues for me.

深爱不及久伴 2024-12-08 23:42:49

程序显示于
http://off-topic.biz/en/eclipse -hangs-at-startup-showing-only-the-splash-screen/
为我工作

  1. cd .metadata/.plugins
  2. mv org.eclipse.core.resources org.eclipse.core.resources.bak
  3. 启动 eclipse。 (它应该显示一条错误消息或一个空工作区,因为没有找到项目。)
  4. 关闭所有打开的编辑器选项卡。
  5. 退出日食。
  6. rm -rf org.eclipse.core.resources (删除新建的目录。)
  7. mv org.eclipse.core.resources.bak/ org.eclipse.core.resources (恢复原来的目录。)
  8. 启动 eclipse 并开始工作。 :-)

The procedure shown at
http://off-topic.biz/en/eclipse-hangs-at-startup-showing-only-the-splash-screen/
worked for me

  1. cd .metadata/.plugins
  2. mv org.eclipse.core.resources org.eclipse.core.resources.bak
  3. Start eclipse. (It should show an error message or an empty workspace because no project is found.)
  4. Close all open editors tabs.
  5. Exit eclipse.
  6. rm -rf org.eclipse.core.resources (Delete the newly created directory.)
  7. mv org.eclipse.core.resources.bak/ org.eclipse.core.resources (Restore the original directory.)
  8. Start eclipse and start working. :-)
溺渁∝ 2024-12-08 23:42:49

只需删除工作区文件夹中的 .metadata 文件夹即可,而不是创建新的工作区。这将使您能够加载工作区并只需将所有项目和首选项重新导入其中 - 这将为您节省一些时间。
在执行此操作之前或重新创建工作区之前,您还可以检查一件事:查看 .log 文件(位于该 .metadata 文件夹中)以获取可能有助于说明问题原因的信息。

Instead of creating a new workspace, just delete the .metadata folder which resides inside your workspace folder. This will enable you to load the workspace and just re-import all projects and preferences into it - it will save some time for you.
One more thing you can check before you do this or before you recreate the workspace: look at the .log file (which resides in that .metadata folder) for information that may give some light to the cause of the problem.

慕巷 2024-12-08 23:42:49

是的,JavaHL 可能是最合适的选择,因为安装它可以解决问题。奇怪的是,Eclipse 以前从来没有因为这个原因挂起,但在崩溃之后,它就挂了。

Yup, JavaHL was the likely cuprit as installing it solved the problem. It's still odd that Eclipse never hung before due to this reason, but after a crash, it did.

べ映画 2024-12-08 23:42:49

正如托尼所说,创建一个新的工作空间对我来说很有效。

As Tonny says is the comments, creating a new workspaces did the trick for me.

寄风 2024-12-08 23:42:49

我经常遇到这个问题。不确定原因。

删除我的工作区是可行的,但我讨厌必须再次配置所有内容。当我将工作区移动到另一个位置、启动 Eclipse 并卸载一些我不再需要的插件时解决了这个问题。然后我删除了新创建的工作区并将旧的工作区移了回来。

我想你可以尝试不卸载任何东西,看看是否有帮助。

I run into this problem frequently. Not sure of the cause.

Removing my workspace works but I hate having to configure everything again. Once I solved it when I moved my workspace to another location, started Eclipse and uninstalled a few plugins I didn't need anymore. Then I removed the newly created workspace and moved the old one back.

I imagine you could try without uninstalling anything and see if it helps.

我一向站在原地 2024-12-08 23:42:49

我遇到了同样的问题,如果您点击链接,我会解释我做了什么

加载调试配置时 Eclipse Luna 挂起

似乎 .Lock 文件在 .metadata 文件夹中未正确关闭,并阻止 Eclipse 启动工作台。

删除 .metadata 文件夹,然后重新导入该项目,这应该可以使其再次工作。

I had the same kind of problem, if you follow the link I explain what I did

Eclipse Luna Hanging when Loading Debug Configuration

It seems the .Lock file was not closed properly within the .metadata folder and prevented eclipse from starting the workbench.

delete the .metadata folder and then just re-imported the project this should get it working again.

段念尘 2024-12-08 23:42:49

在一种情况下,我必须删除文件 .metadata/.plugins/org.eclipse.core.resources/11.snap

该文件是 org. eclipse.core.resources 文件夹。

这样,工作区中的所有内容都被保留。

In one case, I had to delete the file .metadata/.plugins/org.eclipse.core.resources/11.snap

This file was the only non-hidden file in the org.eclipse.core.resources folder.

This way, everything in the workspace was preserved.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文