Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2008

Tip: Looking for answers? Try searching our database.

Ant "no resources found"

Thread view: 
Lionel - 09 Apr 2008 03:48 GMT
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.
Roedy Green - 09 Apr 2008 08:16 GMT
><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.

Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com

Lionel - 09 Apr 2008 23:22 GMT
>> <target name="run" depends="dist">
>>   <apply executable="javaws">
[quoted text clipped - 9 lines]
>   </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.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.