aspose file tools*
The moose likes Mac OS and the fly likes how to set PATH (setenv) in Terminal  (Im trying to setup Ant) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Mac OS
Bookmark "how to set PATH (setenv) in Terminal  (Im trying to setup Ant)" Watch "how to set PATH (setenv) in Terminal  (Im trying to setup Ant)" New topic
Author

how to set PATH (setenv) in Terminal (Im trying to setup Ant)

Max Simpson
Ranch Hand

Joined: Sep 23, 2004
Posts: 30
Hi,
Im trying to get Ant running on OS X 10.3. It runs fine if you type the full path /usr/local/ant/bin/ant. I have tried adding the following lines to tcsh so I can simply type 'ant' at the prompt:

setenv JAVA_HOME /Library/Java/Home
setenv ANT_HOME /usr/local/ant
setenv PATH /usr/local/ant/bin:$PATH

This doesn't seem to work. I using the default Terminal(bash) for Panther. I found these instructions online which me be for OS X 10.2 at:
http://www.macdevcenter.com/pub/a/mac/2003/10/03/ant.html

Please help, I dont know much about unix stuff.. this is driving me nuts!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61628
    
  67

tcsh is not the startup script for the bash shell. Add your PATH redefinition to .bash_profile instead.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Max Simpson
Ranch Hand

Joined: Sep 23, 2004
Posts: 30
Thanks you! I a newbie to the Mac. Just trying to get it setup for MIDP development.

would I type emacs ~/.bash_profile to edit that file? I'm not at home right now to try.

Thanks again.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61628
    
  67

Yup.
 
Don't get me started about those stupid light bulbs.
 
subject: how to set PATH (setenv) in Terminal (Im trying to setup Ant)