ant command needs sudo authority to run on OSX?

86 views Asked by At

I just installed Apache Ant.

I unzipped file and put in to my ~/ folder.

And I edited my .bash_profile like below (of course, I did source, too)

export AKKA_HOME=/usr/local/share/akka
export SCALA_HOME=/usr/local/share/scala
export MAGICK_HOME=/opt/ImageMagick
export DYLD_LIBRARY_PATH=$MAGICK_HOME/lib/
export ANT_HOME=/Users/juneyoungoh/apache-ant-1.9.5

# PostgreSQL.app
# export POSTGRESQL_PATH=/Applications/Postgres.app/Contents/Versions/9.4/bin/
# pg_dir=/Library/PostgreSQL/9.4/lib

export POSTGRESQL_PATH=/Library/PostgreSQL/9.4/bin
export PGDATA=/Users/juneyoungoh/Documents/postgreSQL

After this, I type ant -v commend and got an error like...

Error: Could not find or load main class org.apache.tools.ant.launch.Launcher

So I tried sudo ant -v and it works. I do not know why ant command needs sudo authority and how to do it without the authority.

Thanks for answers :D (I want to know reason and solution both! ty)

0

There are 0 answers