Ant "no resources found"

Discussion in 'Java' started by Lionel, Apr 9, 2008.

  1. Lionel

    Lionel Guest

    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.
     
    Lionel, Apr 9, 2008
    #1
    1. Advertising

  2. Lionel

    Roedy Green Guest

    On Wed, 09 Apr 2008 12:48:09 +1000, Lionel <> 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
     
    Roedy Green, Apr 9, 2008
    #2
    1. Advertising

  3. Lionel

    Lionel Guest

    Roedy Green wrote:
    > On Wed, 09 Apr 2008 12:48:09 +1000, Lionel <> 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.
     
    Lionel, Apr 9, 2008
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Miguel De Anda

    ant property file

    Miguel De Anda, Jun 27, 2003, in forum: Java
    Replies:
    4
    Views:
    16,448
  2. Chris Bedford
    Replies:
    6
    Views:
    2,251
  3. john martin
    Replies:
    2
    Views:
    2,224
    john martin
    Apr 7, 2005
  4. Replies:
    1
    Views:
    518
    Larry
    Mar 7, 2006
  5. Replies:
    6
    Views:
    883
Loading...

Share This Page