File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes IDEs, Version Control and other tools and the fly likes how to install and configure ANT and MAVEN with eclipse in windows vista ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "how to install and configure ANT and MAVEN with eclipse in windows vista ?" Watch "how to install and configure ANT and MAVEN with eclipse in windows vista ?" New topic
Author

how to install and configure ANT and MAVEN with eclipse in windows vista ?

Vinod Vinu
Ranch Hand

Joined: Aug 30, 2009
Posts: 217
Iam a newbie to JAVA. I want to configure Maven and ANT with eclipse in windows vista.
what i have done till now,

--------------------------------------------------------------------------------------------------
i have configured ANT with path specified upto its location like

C:\Program Files (x86)\Apache Software Foundation\apache-ant-1.7.0\bin\ant.bat

with the following arguement as :-
fGen-debug

but seems to be not working and giving me the following msg in console of eclipse:-
ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
--------------------------------------------------------------------------------------------

For maven, the path defined is

C:\Program Files (x86)\Apache Software Foundation\apache-maven-2.0.9\bin\mvn.bat

with the following arguement:-
-o compile

iam getting the following error msg on the console:-
ERROR: JAVA_HOME is set to an invalid directory.
JAVA_HOME = C:\Program Files (x86)\Java\jdk1.6.0\bin
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation
-----------------------------------------------------------------------------------------------

what is that ?

Following are the basic path setting in my system variables:-

ANT_HOME - C:\Program Files (x86)\Apache Software Foundation\apache-ant-1.7.0
JAVA_HOME - C:\Program Files (x86)\Java\jdk1.6.0\bin
Path - %JAVA_HOME%/bin;%ANT_HOME%/bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files (x86)\Common Files\Roxio Shared\DLLShared\;C:\Program Files (x86)\Common Files\Roxio Shared\10.0\DLLShared\;C:\Program Files\MySQL\MySQL Server 5.1\bin


Your help would be really appreciated.
thanks in advance..........


Vinod Kumar Nair
"Any fool can write code that a computer can understan. Good programmers write code that humans can understand."
Ninad Kulkarni
Ranch Hand

Joined: Aug 31, 2007
Posts: 787

@ Vinod
JAVA_HOME - C:\Program Files (x86)\Java\jdk1.6.0\bin

JAVA_HOME should be set to - C:\Program Files (x86)\Java\jdk1.6.0 not bin directory


SCJP 5.0 - JavaRanch FAQ - Java Beginners FAQ - SCJP FAQ - SCJP Mock Tests - Tutorial - JavaSE7 - JavaEE6 -Generics FAQ - JLS - JVM Spec - Java FAQs - Smart Questions
Vinod Vinu
Ranch Hand

Joined: Aug 30, 2009
Posts: 217
thanks alot.....for making the JAVA_HOME path correct

howevr iam still facing the same error msgs in case of ANT and MAVEN...
please checks its path and tell me is it right or wrong

thank you
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5812
    
    7

I strongly recommend that you not place any Java code into a directory that includes spaces in it's path. So not in Program Files, nor in Documents and Settings (e.g., not on an XP desktop, a Vista desktop is OK - its at c:\users\xxx\Desktop). There are some Java libraries that cannot handle the spaces in the path. I have Ant and Maven installed at c:\apps\java (for example, ANT_HOME is c:\apps\java\apache-ant-1.7.1)

Your PATH is incorrect - you need to use backward slashes, not forward slashes.

Also, set M2_HOME.

Then open a command prompt and enter:

ant -version
mvn -version

Post the entire command prompt output, including the commands you entered. For example, like this (yeah, this is from Linux, I'm not gonna reboot just for this):

$ ant -version
Apache Ant version 1.7.1 compiled on June 27 2008
$ mvn -version
Apache Maven 2.1.0 (r755702; 2009-03-18 11:10:27-0800)
Java version: 1.6.0_17
Java home: /usr/java/jdk1.6.0_17/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux" version: "2.6.28-18-generic" arch: "i386" Family: "unix"


JBoss In Action
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to install and configure ANT and MAVEN with eclipse in windows vista ?
 
Similar Threads
Problem with JDK at command prompt
How to create a bat file to run a executable jar
ANT - and was unexpected at this time.
Strange error getting on the console
Ant: InstallTask (etc.) cannot be found