You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Vishal Arora <vi...@gmail.com> on 2012/10/08 12:54:29 UTC

Unable to run Ant

Dear Sir/ Madam,

Whenever i try to run apache ant in the console window i always encounter
the error "*Error: Could not find or load main class
org.apache.tools.ant.launch.Launcher*". I have been facing this  problem
since i download Ant. I have tried many methods but the outcome is always
nothing. I am using Java 7.

Thank You

-- 
VISH

Re: Unable to run Ant

Posted by Rainer Noack <ra...@noacks.net>.
Hi Vishal,

Sounds like launcher is not in you classpath.
The best way is to set 2 environment-variables before running ant:
JAVA_HOME that points to your JDK (or JRE if you don't need tools.jar)  and
ANT_HOME that points to your ant installation directory.
see "Installing Apache Ant" (espacially chapter "Setup") and "Running 
Apache Ant" in http://ant.apache.org/manual/index.html

Kind Regards

Rainer

Am 08.10.2012 12:54, schrieb Vishal Arora:
> Dear Sir/ Madam,
>
> Whenever i try to run apache ant in the console window i always encounter
> the error "*Error: Could not find or load main class
> org.apache.tools.ant.launch.Launcher*". I have been facing this  problem
> since i download Ant. I have tried many methods but the outcome is always
> nothing. I am using Java 7.
>
> Thank You
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org