Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > Ant "no resources found"

Reply
Thread Tools

Ant "no resources found"

 
 
Lionel
Guest
Posts: n/a
 
      04-09-2008
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.checkConfi guration(ExecuteOn.java:305)
at
org.apache.tools.ant.taskdefs.ExecTask.execute(Exe cTask.java:485)
at
org.apache.tools.ant.UnknownElement.execute(Unknow nElement.java:28
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknow n Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at
org.apache.tools.ant.dispatch.DispatchUtils.execut e(DispatchUtils.java:105)
at org.apache.tools.ant.Task.perform(Task.java:34
at org.apache.tools.ant.Target.execute(Target.java:35 7)
at org.apache.tools.ant.Target.performTasks(Target.ja va:385)
at
org.apache.tools.ant.Project.executeSortedTargets( Project.java:1329)
at org.apache.tools.ant.Project.executeTarget(Project .java:129
at
org.apache.tools.ant.helper.DefaultExecutor.execut eTargets(DefaultExecutor.java:41)
at org.apache.tools.ant.Project.executeTargets(Projec t.java:1181)
at org.apache.tools.ant.Main.runBuild(Main.java:69
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.
 
Reply With Quote
 
 
 
 
Roedy Green
Guest
Posts: n/a
 
      04-09-2008
On Wed, 09 Apr 2008 12:48:09 +1000, Lionel <(E-Mail Removed)> wrote,
quoted or indirectly quoted someone who said :

><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.

--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
Reply With Quote
 
 
 
 
Lionel
Guest
Posts: n/a
 
      04-09-2008
Roedy Green wrote:
> On Wed, 09 Apr 2008 12:48:09 +1000, Lionel <(E-Mail Removed)> wrote,
> quoted or indirectly quoted someone who said :
>
>> <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>



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>
</target>


> <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.
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Run ant script from ant script? lionelv@gmail.com Java 6 07-26-2007 02:12 AM
py2app question: Resources/Python -> Resources/lib/python2.4 Russell E. Owen Python 0 09-08-2006 08:08 PM
error runing ant in eclipse ant view yihucd@gmail.com Java 1 03-07-2006 08:39 PM
trouble with Hibernate and Ant (probably just Ant) john martin Java 2 04-07-2005 09:27 PM
wondering how i can launch tomcat from ant without ant hanging... Chris Bedford Java 6 12-23-2004 12:41 AM



Advertisments