Ant Exec Error=2 No Such File Or Directory
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta no such file or directory exec of cgi failed Discuss the workings and policies of this site About Us Learn more no such file or directory exec of '/var/www/cgi-bin/ about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack unable to execute no such file or directory Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you,
Bash No Such File Or Directory Execute
helping each other. Join them; it only takes a minute: Sign up Ant: No such file or directory up vote 1 down vote favorite 1 I need to write ant script to execute one file in linux but prior to execution of file i need to execute setup file. in putty i used to something like ". ./setup" linux no such file or directory but file exists and then "./executeme" In same way i have written ant script as But it gives error as "/bin/sh: . ./setup: No such file or directory". Also can someone explain me the difference between execution of "./setup" and ". ./setup "?? thanks in advance. java linux ant exec share|improve this question edited Jul 31 '12 at 20:37 asked Jul 31 '12 at 20:30 coolgokul 125513 add a comment| 2 Answers 2 active oldest votes up vote 5 down vote accepted You can run the command sequence you use in an interactive session by creating a single-line script, and passing it to sh using -c like this: You need to pass the two commands as one arg, otherwise they are treated differently: the first one becomes the 'script' and the next becomes the first argument for that script. Or, if you like, the above is equivalent to running sh -c ". ./setup; ./executeme
Java JSRs Mobile Certification Databases Caching Books Engineering Languages Frameworks Products This Site Careers Other all forums Forum: Ant, Maven and Other Build Tools Trouble launching ant exec task Dave Alvarado Ranch Hand Posts: 436 posted 6 years ant command not found mac ago Hi, I'm using Ant 1.7 on Mac 10.6.3. In my .bash_profile, I have
Bin/ant: No Such File Or Directory
defined an alias called "restart", that runs some commands. I would like to execute this same alias in my ant task, but
Install Ant On Mac
'' isn't working. Here is my larger target ... http://stackoverflow.com/questions/11748505/ant-no-such-file-or-directory /> Instead I get the error ... /Users/davea/projects/LVCVA/LVCVA/ant/build.xml:293: Execute failed: java.io.IOException: Cannot run program "restart" (in directory "/Users/davea/projects/LVCVA/LVCVA/ant"): error=2, No such file or directory Any ideas what I can do to address the problem? Thanks, - Dave Peter Johnson author Bartender Posts: 5856 7 I like... posted 6 years ago I don't think you can an alias. An alias is something defined to https://coderanch.com/t/495844/tools/Trouble-launching-ant-exec-task bash and is specific to bash, whereas communicates to the OS (not to bash). So try ing bash, passing the alias to bash. JBoss In Action Dave Alvarado Ranch Hand Posts: 436 posted 6 years ago You mean pass in "bash" as the executable and have my aliased command as my argument? - Dave David Newton Author Rancher Posts: 12617 I like... posted 6 years ago Or define it as a shell script as opposed to an alias--arguably cleaner. Dave Alvarado Ranch Hand Posts: 436 posted 6 years ago So when I do this is the second exec waiting for the first to complete? If not, how can I force that? Also, normally I see output from these commands but I don't when I run the ant task. Anyway to get it pipe the output to the terminal? Thanks, - Dave David Newton Author Rancher Posts: 12617 I like... posted 6 years ago Why not use the Tomcat Ant tasks? Peter Johnson author Bartender Posts: 5856 7 I like... posted 6 years ago Dave Alvarado wrote:You mean pass in "bash" as the executable and have my aliased command as my argument? - Dave Yes. Check out the -c optio
only way to send input to it is via the input and inputstring attributes. Also note https://ant.apache.org/manual/Tasks/exec.html that since Ant 1.6, any attempt to read input in the forked program will receive an EOF (-1). This is a change from Ant 1.5, where such an attempt would block. If you want to execute an executable using a path relative to the project's basedir, you may need to use vmlauncher="false" on some operating systems no such - but even this may fail (Solaris 8/9 has been reported as problematic). The resolveexecutable attribute should be more reliable, as would be something like task delegates to Runtime.exec which in turn apparently calls ::CreateProcess. It is the latter Win32 function that defines the exact no such file semantics of the call. In particular, if you do not put a file extension on the executable, only ".EXE" files are looked for, not ".COM", ".CMD" or other file types listed in the environment variable PATHEXT. That is only used by the shell. Note that .bat files cannot in general by executed directly. One normally needs to execute the command shell executable cmd using the /c switch. A common problem is not having the executable on the PATH. In case you get an error message Cannot run program "...":CreateProcess error=2. The system cannot find the path specified. have a look at your PATH variable. Just type the command directly on the command line and if Windows finds it, Ant should do it too. (Otherwise ask on the user mailinglist for help.) If Windows can not execute the program add the directory of the program to the PATH (set PATH=%PATH%;dirOfProgram) or specify the a