Problem in running ant on unix


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Problem in running ant on unix
# 1  
Old 03-30-2012
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  
Old 03-30-2012
Your variable $ANT_HOME isn't set. If it is an environment variable, don't forget to export it.
# 3  
Old 03-30-2012
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  
Old 03-30-2012
Did you set $JAVA_HOME ?
Installing Apache Ant
# 5  
Old 03-30-2012
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  
Old 03-30-2012
And did you export those variables?
 
Login or Register to Ask a Question

Previous Thread | Next Thread

6 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 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

5. 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

6. 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
Login or Register to Ask a Question