使用eclipse RCP导出操作的Webstart问题

时间:2014-06-05 09:51:20

标签: eclipse-rcp java-web-start jnlp rcp

我有eclipse示例eclipse RCP应用程序。我正在尝试将其导出为WebStart。但是在导出要素项目时会出现以下错误消息。

D:\apps\eclipse-jee-kepler-SR2-win32-x86_64\eclipse\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\assemble.org.eclipse.pde.container.feature.p2.xml:43: The following error occurred while executing this line:
D:\apps\eclipse-jee-kepler-SR2-win32-x86_64\eclipse\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\assemble.org.eclipse.pde.container.feature.p2.xml:64: The jarsigner could not be found. Make sure to run with the build with a JDK.
    at org.apache.tools.ant.ProjectHelper.addLocationToBuildException(ProjectHelper.java:551)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:444)
    at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:392)
    at org.apache.tools.ant.Target.performTasks(Target.java:413)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
    at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
    at org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:672)
    at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:498)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.eclipse.ant.core.AntRunner.run(AntRunner.java:378)
    at org.eclipse.pde.internal.core.exports.FeatureExportOperation.runScript(FeatureExportOperation.java:422)
    at org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:267)
    at org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:223)
    at org.eclipse.pde.internal.core.exports.FeatureExportOperation.run(FeatureExportOperation.java:100)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: D:\apps\eclipse-jee-kepler-SR2-win32-x86_64\eclipse\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\assemble.org.eclipse.pde.container.feature.p2.xml:64: The jarsigner could not be found. Make sure to run with the build with a JDK.
    at org.eclipse.equinox.internal.p2.jarprocessor.ant.AntSignCommand.execute(AntSignCommand.java:54)
    at org.eclipse.equinox.internal.p2.jarprocessor.ant.AntSignCommand.postProcess(AntSignCommand.java:36)
    at org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor.postProcess(JarProcessor.java:252)
    at org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessor.processJar(JarProcessor.java:345)
    at org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.process(JarProcessorExecutor.java:173)
    at org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.processDirectory(JarProcessorExecutor.java:195)
    at org.eclipse.equinox.internal.p2.jarprocessor.ant.AntBasedProcessorExecutor.processDirectory(AntBasedProcessorExecutor.java:60)
    at org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.process(JarProcessorExecutor.java:155)
    at org.eclipse.internal.provisional.equinox.p2.jarprocessor.JarProcessorExecutor.runJarProcessor(JarProcessorExecutor.java:82)
    at org.eclipse.equinox.internal.p2.jarprocessor.ant.JarProcessorTask.execute(JarProcessorTask.java:109)
    at org.eclipse.equinox.p2.internal.repository.tools.tasks.ProcessRepoTask.execute(ProcessRepoTask.java:87)
    at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
    at sun.reflect.GeneratedMethodAccessor123.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
    at org.apache.tools.ant.Task.perform(Task.java:348)
    at org.apache.tools.ant.Target.execute(Target.java:392)
    at org.apache.tools.ant.Target.performTasks(Target.java:413)
    at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
    at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
    at org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:30)
    at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
    at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
    ... 26 more
Caused by: Execute failed: java.io.IOException: Cannot run program "jarsigner.exe" (in directory "D:\apps\eclipse-jee-kepler-SR2-win32-x86_64\eclipse\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature"): CreateProcess error=2, The system cannot find the file specified
    at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:675)
    at org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:498)
    at org.apache.tools.ant.taskdefs.SignJar.signOneJar(SignJar.java:490)
    at org.apache.tools.ant.taskdefs.SignJar.execute(SignJar.java:405)
    at org.eclipse.equinox.internal.p2.jarprocessor.ant.AntSignCommand.execute(AntSignCommand.java:51)
    ... 49 more
Caused by: java.io.IOException: Cannot run program "jarsigner.exe" (in directory "D:\apps\eclipse-jee-kepler-SR2-win32-x86_64\eclipse\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature"): CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessBuilder.start(Unknown Source)
    at java.lang.Runtime.exec(Unknown Source)
    at org.apache.tools.ant.taskdefs.Execute$Java13CommandLauncher.exec(Execute.java:862)
    at org.apache.tools.ant.taskdefs.Execute.launch(Execute.java:481)
    at org.apache.tools.ant.taskdefs.Execute.execute(Execute.java:495)
    at org.apache.tools.ant.taskdefs.ExecTask.runExecute(ExecTask.java:631)
    at org.apache.tools.ant.taskdefs.ExecTask.runExec(ExecTask.java:672)
    ... 53 more
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(Unknown Source)
    at java.lang.ProcessImpl.start(Unknown Source)
    ... 60 more

1 个答案:

答案 0 :(得分:0)

在eclipse中更改java构建路径以获取jdk下的jarsigner.exe。