Problem in running ant on unix


 
Thread Tools Search this Thread
# 1  
Problem in running ant on unix

Hello,

I am trying to run ant from a shell script a.sh.
a.sh is placed in the /usr/myScripts folder

a.sh looks like
..........
Code:
${ANT_HOME}/bin/ant -myBuild.xml

While trying to run a.sh i am getting
Code:
/usr/modules/apache.ant_1.7.1 /bin/ant: No such file or directory.

Can anyone tel me how to run this?

Moderator's Comments:
Mod Comment Please use code tags!

Last edited by Scrutinizer; 03-30-2012 at 03:40 AM..
# 2  
Your variable $ANT_HOME isn't set. If it is an environment variable, don't forget to export it.
# 3  
Thanks for the reply!
$ANT_HOME is set properly to /usr/apache.ant_1.7.1
It is executing myBuild.xml file..
But giving the following error :
Code:

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher

I have also added $ANT_HOME/bin to the $PATH VARIABLE.

Can you please help me?
# 4  
Did you set $JAVA_HOME ?
Installing Apache Ant
# 5  
Yes $JAVA_HOME is already set to
Code:
/usr/java/jdk1.6.0_11

And also included in the $PATH with bin appended after the $JAVA_HOME.
# 6  
And did you export those variables?
 

Previous Thread | Next Thread
Thread Tools Search this Thread
Search this Thread:
Advanced Search

8 More Discussions You Might Find Interesting

1. Red Hat

Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-la

Have no idea on what the below error message is: Process not running: /opt/java15/jdk/bin/java -classpath /opt/apache/apache-ant-1.7.0-mod/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher -buildfile build.xml dist. Any help? (3 Replies)
Discussion started by: gull05
3 Replies

2. AIX

Strange problem running python program from within ant

Hello, I'm currently trying to port an ant based build to AIX 6.1. The build queries the underlying version control system (Mercurial) for some data, which works fine on other platforms (Linux, Solaris). However, on AIX the hg command fails to load python's md5 module when used in the build,... (1 Reply)
Discussion started by: dhs
1 Replies

3. Windows & DOS: Issues & Discussions

ANT: Telnet is not working

I am trying the below ANT telnet task: <telnet userid="appldev" password="techm123" server="${BT_Server}"> <read>/u01/appldev/devappl/po/11.5.0/reports</read> <!--write>cd /u01/appldev/devappl/po/11.5.0/reports/</write--> <write>ls</write> <read... (0 Replies)
Discussion started by: Dip
0 Replies

4. UNIX for Dummies Questions & Answers

How to detect and uninstall apache ant ?

Hello, At my linux server I think there are 2 duplicate Apache Ant Installation 1) opt/ant 2) usr/local/ant And whenever I tires to build ant using command 1)cd opt/ant 2) ant or 1)cd usr/local/ant 2) ant it shows error message "ant build failed" Does it show above error due... (4 Replies)
Discussion started by: ninadgac
4 Replies

5. UNIX for Advanced & Expert Users

Functionality of ant build and ant deploy unix commands

I have made some code changes in the corresponding java file for date formatting purpose so that it supports upgraded sybase version from 12.6 to 12.7 and have build the code and deployed using the following UNIX commands. ant build ant deploy. "ant build" executes the build.xml which is... (1 Reply)
Discussion started by: vmpcit
1 Replies

6. UNIX for Dummies Questions & Answers

Problem running plsql & unix commands in 1 script

Hi, I need help again. When I run this shell script, it only runs the unld_date.sql piece and exits. How can I structure this to run all the way to the end? When I don't have the unld_date.sql piece in here, everything runs fine from the date compare piece all the way to the end. Thanks in... (5 Replies)
Discussion started by: siog
5 Replies

7. Shell Programming and Scripting

Ant & Unix

Hi How can we call ant script in Unix shell script. My purpose is to call ant script which uses sql tag for getting connection to database and then run sql statements in the database. Once sql execution is over , it should then check its result for error and if ok , should then run the sql... (0 Replies)
Discussion started by: pankajkrmishra
0 Replies

8. Shell Programming and Scripting

ant not being executed as cron job

i have a script that uses an ant build.xml and its targets to pull a project from a cvs server, attempt to build the project, and then email me the results. When I run the script (either @ CLI or as a cron job) while I am logged in, everything works fine. However, if the script is set up to run... (5 Replies)
Discussion started by: kingfinny
5 Replies

Featured Tech Videos