gpt4 book ai didi

eclipse - 在 Unix 机器上构建 Windows RCP 应用程序

转载 作者:行者123 更新时间:2023-12-02 18:34:48 26 4
gpt4 key购买 nike

我们正在尝试通过 Hudson/Jenkins 为 RCP 应用程序构建 Eclipse PDE。到目前为止,我们在 Windows 计算机上成功地完成了此操作(Hudson 在 Windows Server 2003 上运行)。我们决定将 CI 系统迁移到 UNIX 机器上。当在 unix 机器上执行相同的构建时,我们的构建失败并出现以下错误:

!SESSION 2011-04-12 01:00:49.497 -----------------------------------------------eclipse.buildId=unknownjava.version=1.6.0_23java.vendor=Sun Microsystems Inc.BootLoader constants: OS=win32, ARCH=sparc, WS=win32, NL=en_USFramework arguments:  -application org.eclipse.ant.core.antRunner -buildfile /appl/midw/jenkins/jobs/AP_NAPF/workspace/TP/plugins/org.eclipse.pde.build_3.4.1.R34x_v20081217/scripts/build.xml main -Ddummy=trueCommand-line arguments:  -ws win32 -os win32 -application org.eclipse.ant.core.antRunner -buildfile /appl/midw/jenkins/jobs/AP_NAPF/workspace/TP/plugins/org.eclipse.pde.build_3.4.1.R34x_v20081217/scripts/build.xml main -data /appl/midw/jenkins/jobs/AP_NAPF/workspace/ap_build/workspace -Ddummy=true!ENTRY org.eclipse.osgi 4 0 2011-04-12 01:00:58.961!MESSAGE An error occurred while automatically activating bundle org.eclipse.ui.workbench (687).!STACK 0org.osgi.framework.BundleException: The activator org.eclipse.ui.internal.WorkbenchPlugin for bundle org.eclipse.ui.workbench is invalid    at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:146)    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:980)    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400)    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:111)    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:427)    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193)    at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:370)    at org.eclipse.osgi.framework.internal.core.SingleSourcePackage.loadClass(SingleSourcePackage.java:33)    at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:443)    at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:399)    at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:387)    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)    at java.lang.ClassLoader.defineClass1(Native Method)    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)    at java.lang.ClassLoader.defineClass(ClassLoader.java:616)    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass(DefaultClassLoader.java:165)    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.defineClass(ClasspathManager.java:554)    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findClassImpl(ClasspathManager.java:524)    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClassImpl(ClasspathManager.java:455)    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass_LockClassLoader(ClasspathManager.java:443)    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:423)    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:193)    at org.eclipse.osgi.framework.internal.core.BundleLoader.findLocalClass(BundleLoader.java:370)    at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:446)    at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:399)    at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:387)    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)    at org.eclipse.osgi.framework.internal.core.BundleLoader.loadClass(BundleLoader.java:315)    at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:227)    at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:139)    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:980)    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:346)    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:265)    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:400)    at org.eclipse.osgi.framework.internal.core.BundleHost.loadClass(BundleHost.java:234)    at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadClass(AbstractBundle.java:1274)    at org.eclipse.ant.core.AntCorePreferences$WrappedClassLoader.findClass(AntCorePreferences.java:115)    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)    at org.eclipse.ant.internal.core.AntClassLoader.loadClassPlugins(AntClassLoader.java:69)    at org.eclipse.ant.internal.core.AntClassLoader.findClass(AntClassLoader.java:47)    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)    at org.eclipse.ant.core.AntRunner.run(AntRunner.java:510)    at org.eclipse.ant.core.AntRunner.start(AntRunner.java:600)    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:386)    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)    at java.lang.reflect.Method.invoke(Method.java:597)    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)    at org.eclipse.equinox.launcher.Main.run(Main.java:1236)    at org.eclipse.equinox.launcher.Main.main(Main.java:1212)Caused by: java.lang.NoClassDefFoundError: org/eclipse/swt/SWTError    at java.lang.Class.getDeclaredConstructors0(Native Method)    at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389)    at java.lang.Class.getConstructor0(Class.java:2699)    at java.lang.Class.newInstance0(Class.java:326)    at java.lang.Class.newInstance(Class.java:308)    at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:141)    ... 61 moreCaused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError    at org.eclipse.osgi.framework.internal.core.BundleLoader.findClassInternal(BundleLoader.java:483)    at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:399)    at org.eclipse.osgi.framework.internal.core.BundleLoader.findClass(BundleLoader.java:387)    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:87)    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)    ... 67 moreRoot exception:java.lang.NoClassDefFoundError: org/eclipse/swt/SWTError

在迁移到新的基础架构后,我已经尝试了一些方法,但没有成功:

  • 使用 bootclasspath 属性使用不同的 rt.jar(来自 Windows JRE)进行 PDE 构建。
  • -os 命令行参数更改为:solaris

是否有可能在 Unix 机器上为 Windows 应用程序构建 RCP?如果是,启动PDE构建时是否需要更改任何参数?

注意:我们正在使用pluginbuilder设置 PDE 构建。

最佳答案

用于执行 PDE 构建的 Eclipse(即 org.eclipse.ant.core.antRunner 应用程序)必须在构建服务器环境中可执行。你说你正在Unix机器上执行构建,但是ws和os参数设置为win32。看来您在 Unix 构建服务器上使用了 Windows 版本的 Eclipse。这是行不通的,因为 Unix 特定的片段通常在那里不可用(例如 SWT 需要,这就是找不到类 SWTError 的原因)。

您应该从 eclipse.org 下载一个特定于您的构建服务器上的环境(操作系统、窗口系统和处理器架构)的 Eclipse,并使用它来运行 PDE 构建。

关于eclipse - 在 Unix 机器上构建 Windows RCP 应用程序,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5634856/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com