I have an Eclipse application, for which I created the feature for generating the jnlp file. I built the application with maven tycho, for architectures x86 and x86_64.
当我尝试启动 jnlp 应用程序时, 我看到所有的资源都下载了, 但应用程序没有启动 。 如果我尝试在 Broswer 中打开它, 它就会启动 。 我检查了第一个案例的日志, 我得到了以下信息 :
eclipse.buildId=unknown
java.version=1.6.0_26
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments: -clientno=01 -StartupLogo=false -mode=3 -sessionid=7110AAD90803F34A9B01CD66A676E0ED.ASES01 -ServletDir=/SES/ -Port=8080 -host=172.20.224.138 -auth=tftttttttttt -Lang=de_DE -user=taris -Protocol=http
Command-line arguments: -clientno=01 -StartupLogo=false -mode=3 -sessionid=7110AAD90803F34A9B01CD66A676E0ED.ASES01 -ServletDir=/SES/ -Port=8080 -host=172.20.224.138 -auth=tftttttttttt -Lang=de_DE -user=taris -Protocol=http
!ENTRY org.eclipse.osgi 4 0 2012-05-28 15:56:46.999
!MESSAGE An error occurred while automatically activating bundle org.eclipse.ui.workbench (20).
!STACK 0
org.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:171)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:679)
at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:299)
at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:440)
at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:268)
at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:463)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:400)
at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:473)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.defineClass
[....]
Caused by: java.lang.NoClassDefFoundError: org/eclipse/swt/SWTError
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
at java.lang.Class.getConstructor0(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.loadBundleActivator(AbstractBundle.java:166)
... 78 more
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.SWTError
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 84 more
以下是创造资源的部分:
<plugin>
<groupId>org.eclipse.tycho</groupId>
<artifactId>target-platform-configuration</artifactId>
<version>${tycho-version}</version>
<configuration>
<resolver>p2</resolver>
<ignoreTychoRepositories>true</ignoreTychoRepositories>
<environments>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86</arch>
</environment>
<environment>
<os>win32</os>
<ws>win32</ws>
<arch>x86_64</arch>
</environment>
</environments>
</configuration>
</plugin>
我查过资源在jnlp档案中被引用:
<resources os="Windows" arch="x86">
<jar href="plugins/org.eclipse.swt.win32.win32.x86_3.7.2.v3740f.jar"/>
我还检查了暗藏处 下载了资源
我只是找不到一个不从 Java 网络启动开始的应用程序的理由,
任何帮助都感激不尽!