you'll want try to locate the main class of the jar cd SomeFolder jar -xvf wsgen.jar
cd SomeFolder javap *.class | grep main //when you see a 'main' method in one of the classes //then assign the main class to classname attribute of taskdef as described here <taskdef name="global" classname="package.ClassWithMain"> <classpath refid="testclasses" /> </taskdef> //now you can call the task from a target <target name="testGlobal"> <global> <echo message="it worked!" /> </global> </target> Martin Gainty ______________________________________________ Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni. > Date: Mon, 31 Aug 2009 18:47:02 -0400 > Subject: Re: Basic question about ant > From: v.kri...@gmail.com > To: user@ant.apache.org > > Since wsgen is in a jar file, I put the complete path of the jar file in > the exec. > So if anttasks.jar was in C:/eclipse/plugins/anttasks.jar then my exec looks > like this: > > <exec executable="C:/eclipse/plugins/wsgen"> > > On Mon, Aug 31, 2009 at 1:01 PM, Gilbert Rebhan <a...@schillbaer.de> wrote: > > > veena pandit schrieb: > > > Hi, > > > > > > I was able to fix the environment variable and run ant from the command > > > line. I tried the things you listed below but from eclipse it still > > gives > > > me an error saying it does not recognize the program wsgen. > > > > > > > did you try the absolute path, f.e. > > > > ... > > <exec executable="C:/whatever/path/to/wsgen"> > > ... > > > > ?? > > > > gives us a snippet with your latest try > > > > > > > > Regards, Gilbert > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > > For additional commands, e-mail: user-h...@ant.apache.org > > > > _________________________________________________________________ Windows Live: Keep your friends up to date with what you do online. http://windowslive.com/Campaign/SocialNetworking?ocid=PID23285::T:WLMTAGL:ON:WL:en-US:SI_SB_online:082009