Ant "no resources found"

L

Lionel

I have a simple task trying to run a jws app:

<target name="run" depends="dist">
<apply executable="javaws">
<arg value="${run.dir}/index.jnlp"/>
</apply>
</target>

I get the error message:


run:
[apply] Current OS is Windows XP

BUILD FAILED
c:\TCIWorks\TCIWorksApplication\build.xml:120: no resources specified
at
org.apache.tools.ant.taskdefs.ExecuteOn.checkConfiguration(ExecuteOn.java:305)
at
org.apache.tools.ant.taskdefs.ExecTask.execute(ExecTask.java:485)
at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:348)
at org.apache.tools.ant.Target.execute(Target.java:357)
at org.apache.tools.ant.Target.performTasks(Target.java:385)
at
org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
at
org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:698)
at org.apache.tools.ant.Main.startAnt(Main.java:199)
at org.apache.tools.ant.launch.Launcher.run(Launcher.java:257)
at org.apache.tools.ant.launch.Launcher.main(Launcher.java:104)

Total time: 11 seconds



I can verify that ${run.dir}/index.jnlp exists.

Any idea what could be causing the error? Or a better way of doing what
I'm trying to achieve?

Thanks

Lionel.
 
R

Roedy Green

<target name="run" depends="dist">
<apply executable="javaws">
<arg value="${run.dir}/index.jnlp"/>
</apply>
</target>

Try this:

<target name="run" depends="dist">
<exec executable="jawaws.exe" dir="${package.dir}">
<arg value="${run.dir}/index.jnlp" />
</exec>
</target>

<apply is for system commands, like DIR -- commands for the command
interpreter.
 
L

Lionel

Roedy said:
Try this:

<target name="run" depends="dist">
<exec executable="jawaws.exe" dir="${package.dir}">
<arg value="${run.dir}/index.jnlp" />
</exec>
</target>


Well I had tried this, I was trying to leave off the .exe in hope it
would work on OS's other than *doze. Anyway, here are the things I
tried, all of which give the same result:

<target name="run" depends="dist">
<apply executable="javaws.exe" dir="${run.dir}">
<arg value="${run.dir}/index.jnlp"/>
</apply>
</target>

********************
<target name="run" depends="dist">
<apply executable="javaws.exe">
<arg value="${run.dir}/index.jnlp"/>
</apply>
</target>

********************
<target name="run" depends="dist">
<apply executable="C:\Program Files\Java\jre1.6.0\bin\javaws.exe">
<arg value="${run.dir}/index.jnlp"/>
</apply>
</target>

*********************
<target name="run" depends="dist">
<apply executable="C:\Program Files\Java\jre1.6.0\bin\javaws.exe"
dir="${run.dir}">
<arg value="${run.dir}/index.jnlp"/>
</apply>
<apply is for system commands, like DIR -- commands for the command
interpreter.


Yeap, was hoping it would work for launching a JWS app also as I don't
see a task for this.

Any other ways of doing what I'm attempting are welcomed. Except of
course double clicking the jnlp file :).

Thanks

Lionel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top