JNLP执行失败,消息为Execute failed:java.io.IOException:无法运行程序“javaws”
我正在使用构建文件来编译我的项目。代码编译成功,正在生成.jar和.jnlp文件。但当我启动应用程序时,我得到了JNLP执行失败,消息为Execute failed:java.io.IOException:无法运行程序“javaws”,java,jnlp,java-web-start,Java,Jnlp,Java Web Start,我正在使用构建文件来编译我的项目。代码编译成功,正在生成.jar和.jnlp文件。但当我启动应用程序时,我得到了 Execute failed: java.io.IOException: Cannot run program "javaws" (in directory "/sreekanth/ProjectsCXF/JavaWebStartTest/src/build/jar"): java.io.IOException: error=2,No such file or d
Execute failed: java.io.IOException: Cannot run program "javaws"
(in directory "/sreekanth/ProjectsCXF/JavaWebStartTest/src/build/jar"):
java.io.IOException: error=2,No such file or directory.
我的构建文件
`<!-- Build file for the project. -->
<project basedir="." default="launch" name="OPRS_JNLP">
<target name="properties">
<property name="build" value="build" />
<property name="dist" value="dist" />
<property name="src" value="src" />
<property
name="classpath"
value="${java.home}/jre/lib/javaws.jar" />
</target>
<target
name="compile"
depends="properties"
description="Compile the project" >
<mkdir dir="${build}/share" />
<javac
debug="on"
destdir="${build}/share"
srcdir="com/abhibus/oprs"
source="1.6"
classpath="${classpath}" />
<copy todir="${build}/share">
<fileset dir="com/abhibus/oprs">
<exclude name="**/CVS" />
<exclude name="**/*.java" />
</fileset>
</copy>
</target>
<target
name="dist"
depends="compile"
description="Create project distribution" >
<mkdir dir="${build}/jar" />
<mkdir dir="${build}/jar/lib" />
<jar destfile="${build}/jar/apsrtcoprs.jar">
<fileset dir="${build}/share">
<include name="**/*.class" />
</fileset>
</jar>
</target>
<target
name="make-launch-file"
depends="properties"
description="Copies and configures the launch file" >
<copy todir="${build}/jar" >
<fileset dir="${src}/conf" >
<include name="**/*.jnlp" />
</fileset>
</copy>
</target>
<target
name="launch"
depends="dist, make-launch-file"
description="Launch the project using webstart">
<exec executable="javaws"
dir="${build}/jar">
<arg line="-codebase file:. file:./apsrtcoprs.jnlp" />
</exec>
</target>
<target
name="uninstall"
depends="properties"
description="Uninstall the project from the webstart cache">
<exec executable="javaws">
<arg
line="-uninstall http://localhost:9999/apsrtcoprs.jnlp"
/>
</exec>
</target>
<target name="clean"
depends="properties"
description="Clean all generated files">
<delete dir="${build}" />
<delete dir="${dist}" />
</target>
</project>`
这里出了什么问题?谁能帮我一下吗
<exec executable="${java.home}/bin/javaws" ..
或者别的什么,但是。。指定完整的路径 你是如何启动它的?您从命令行尝试过吗?请确认您的路径中有${java.home}/bin,这是javaws可执行文件应该驻留的位置。另外,请确认它确实存在。此运行在哪个操作系统上?@eis,您指的是哪条路径?“这是我的项目构建路径吗?”安德鲁·汤普森,谢谢。指定了完整的路径并正在运行:@user1103504可执行路径。你可以像上面说的那样用完整的路径完成同样的事情。