【问题标题】:Eclipse : Welcome page not getting displayedEclipse:欢迎页面未显示
【发布时间】:2009-09-09 13:02:07
【问题描述】:

我正在开发一个基于 Eclipse 构建的应用程序。尽管在 Windows、Sles 32 和 64 位上一切正常,但在 SLED 64 位上,欢迎页面没有显示。当您尝试打开欢迎页面时,它会引发 MalformedUrl 异常 “无法加载 Swt 样式:content/shared.css” 作为错误消息。

我上网查了一下,发现好像有好几个人遇到过这个问题,但是我找不到解决办法。请大家帮帮我。

【问题讨论】:

  • 欢迎页面是我在安装新的 Eclipse 时禁用的第一件事......是什么让它对你如此重要?
  • 我的应用程序建立在 Eclipse 之上,欢迎页面很重要。
  • 我没有找到任何特定于此配置的内容,因此可能是您的应用程序的调试会话是为了查看在 SLED 64 上的 Eclipse 开始时检索到的 IntroModelRoot Windows 会话。

标签: java eclipse exception plugins


【解决方案1】:

该错误消息直接来自 SharedStyleManager 类。

try {
    URL JavaDoc styleURL = new URL JavaDoc(style);
    InputStream JavaDoc is = styleURL.openStream();
    properties.load(is);
    is.close();
    context.path = new Path(style).removeLastSegments(1);
    String JavaDoc t = (String JavaDoc)properties.get("theme"); //$NON-NLS-1$
    if (t!=null && t.trim().equalsIgnoreCase("true")) //$NON-NLS-1$
        context.inTheme = true;
} catch (Exception JavaDoc e) {
    Log.error("Could not load SWT style: " + style, e); //$NON-NLS-1$
}

“无法加载 SWT 样式”异常中是否有异常包? (在您的错误视图中)

【讨论】:

  • 这里是详细信息 Messgae:无法加载 SWT 样式:content/shared.css 异常堆栈跟踪:java.net.MalformedURLException:没有协议:java.net.URL 的 content/shared.css。 (URL.java:567) 在 java.net.URL.(URL.java:464) 在 java.net.URL.(URL.java:413) 在 org.eclipse.ui .internal.intro.impl.swt.SharedStyleManager.load(SharedStyleManager.java:66) 在 org.eclipse.ui.internal.intro.impl.swt.SharedStyleManager.(SharedStyleManager.java:58) 在 org.eclipse .ui.internal.intro.impl.presentations.FormIntroPartImplementation.(FormIntroPartImplementation.java:94)
  • 在 org.eclipse.ui.introPartPresentation.createPartControl(IntroPartPresentation.java:257) 在 org.eclipse.ui.intro.config.CustomizableIntroPart.createPartControl(CustomizableIntroPart. java:194) at org.eclipse.ui.internal.ViewIntroAdapterPart.createPartControl(ViewIntroAdapterPart.java:98) at org.eclipse.ui.internal.ViewReference.createPartHelper(ViewReference.java:371) at org.eclipse.ui.internal .ViewReference.createPart(ViewReference.java:230) at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
  • 在 org.eclipse.ui.internal.Perspective.showView(Perspective.java:2131) 在 org.eclipse.ui.internal.WorkbenchPage.busyShowView(WorkbenchPage.java:1062) 在 org.eclipse .ui.internal.WorkbenchPage$19.run(WorkbenchPage.java:3773) at org.eclipse.swt.custom.BusyIndi​​cator.showWhile(BusyIndi​​cator.java:70) at org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage. java:3770) 在 org.eclipse.ui.internal.WorkbenchPage.showView(WorkbenchPage.java:3746) 在 org.eclipse.ui.internal.WorkbenchIntroManager.createIntro(WorkbenchIntroManager.java:173)
  • 从扩展传递过来的os字符串是“win32 mac linux”
  • 这个问题只能在 SLED 11 64 位机器上重现。
【解决方案2】:

找到问题源。我使用的是不兼容版本的 xulrunner。将此更改为与 eclipse 兼容的版本可以解决问题。

【讨论】:

    猜你喜欢
    • 2012-04-20
    • 2015-07-10
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-08-15
    • 2022-07-31
    • 1970-01-01
    • 2012-01-12
    相关资源
    最近更新 更多