Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

homebrew ant #37338

Closed
michahell opened this issue Mar 3, 2015 · 2 comments
Closed

homebrew ant #37338

michahell opened this issue Mar 3, 2015 · 2 comments

Comments

@michahell
Copy link

Hi,

Not sure if this has been reported before (could not find any issue on GH, open or closed) but after a brew install ant the following command does not work for me:
$ ant -version
gives
Error: Could not find or load main class org.apache.tools.ant.launch.Launcher
And also executing ant --execdebug fails with
``exec "/Library/Java/JavaVirtualMachines/jdk1.8.0_05.jdk/Contents/Home/jre/bin/java" -classpath "/usr/local/Cellar/ant/1.9.4/lib/ant-launcher.jar" -Dant.home="/usr/local/Cellar/ant/1.9.4" -Dant.library.dir="/usr/local/Cellar/ant/1.9.4/lib" org.apache.tools.ant.launch.Launcher -cp ""
Error: Could not find or load main class org.apache.tools.ant.launch.Launcher`

What could be the cause of this? In the meanwhile, will try using ant outside homebrew.

@jacknagel
Copy link
Contributor

Did you forget about #32851?

Do you have ANT_HOME set?

@michahell
Copy link
Author

Aha, yes that was the issue thread I was looking for but could not find.
So I have set ANT_HOME as follows:

export ANT_HOME=/usr/local/Cellar/ant/1.9.4/libexec/
export PATH=$PATH:/usr/local/bin/ant

and now ant -version and ant --execdebug run without errors. Not sure why I could not find these instructions explicitly in the previous thread, it's quite buried in one of the comments.

But thanks for the pointer the the earlier thread!

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants