This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes 'ant' not recognized... 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 » Ant, Maven and Other Build Tools
Bookmark " Watch " New topic
Author

'ant' not recognized...

Heather Rose
Ranch Hand

Joined: Aug 25, 2008
Posts: 54
I have used ant before quite a few times, and I just got a new machine, so I was setting up my environment variables, and for some reason, ant isn't recognized. I have version 1.6.5, and my variables are as follows:

PATH is: PATH=;%PATH%;%JAVA_HOME%\bin;'%ANT_HOME%\bin

JAVA_HOME: C:\Program Files\Java\jdk1.6.0_07

ANT_HOME: C:\Ant\ant-1.6.5

I did not set my CLASSPATH, the only path in there is the jre1.6.0 Everytime I try to run either 'ant' or 'ant -help' or anything else that has to do with ant for that matter, it gives me that error.

Someone please help me out.

-Heather
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60740
    
  65

Inspect your PATH. See the issue?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Heather Rose
Ranch Hand

Joined: Aug 25, 2008
Posts: 54
Yes, I did see that. I took out the "'". Guess I just needed another pair of eyes.

But now I can't get my server to run. It compiles, but it doesn't deploy. It used to display an error message, but now, it just doesn't do anything. It gets hung up. I checked to see if anything was on the same port, and nothing was running on the port I am using for JBoss. It says the normal start up log, but then nothing else.
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Originally posted by Heather Rose:
Yes, I did see that. I took out the "'". Guess I just needed another pair of eyes.

But now I can't get my server to run. It compiles, but it doesn't deploy. It used to display an error message, but now, it just doesn't do anything. It gets hung up. I checked to see if anything was on the same port, and nothing was running on the port I am using for JBoss. It says the normal start up log, but then nothing else.


Often there can be problems with having a 'space' in your JAVA_HOME path, try double quoting it.


Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
Heather Rose
Ranch Hand

Joined: Aug 25, 2008
Posts: 54
Hmm, that didn't do anything. Nothing changed, nor good or bad.

As of right now, I can build my ant script files and they compile successfully and build all the jars, ears, and wars. I've installed jboss 4.2.2.GA with a clean install. That didn't work, or nothing changed. I have replaced that clean install with the one we have on our server and just copied that one. It works on the rest of my team's machine, so I know it's not those files. I'm either missing some libraries, or something on my machine (environmental variables, etc) is not set up right.

I've been working on this issue all morning, and it seems that I'm missing something. I copied the environmental variables' paths from someone else's machine (which works fine), so I know they are correct.

Am I missing any libraries for Eclipse to run? I changed the JDK to the same one I was using (stupid mistake), as well. I honestly cannot think of anything else.

Any ideas?
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 9912
    
158

Originally posted by Heather Rose:

But now I can't get my server to run. It compiles, but it doesn't deploy. It used to display an error message, but now, it just doesn't do anything. It gets hung up. I checked to see if anything was on the same port, and nothing was running on the port I am using for JBoss. It says the normal start up log, but then nothing else.


Can you give us a little more details about how and which folder, you are deploying the application in JBoss? Also, post the console logs of JBoss. And what is your application? Is it a EAR or WAR?
[ August 26, 2008: Message edited by: Jaikiran Pai ]

[My Blog] [JavaRanch Journal]
Martijn Verburg
author
Bartender

Joined: Jun 24, 2003
Posts: 3274
    
    5

Also, please post the contents from your boot.log and server.log, hopefully there's a clue in there.
Heather Rose
Ranch Hand

Joined: Aug 25, 2008
Posts: 54
If anyone was interested, I found out the problem. This was a problem with my explode.launch file. I needed to delete it and redeploy. For some reason, it was conflicting with the one in SVN.

Thanks all for your help.

I am getting a new machine next week (my 3rd one in the past 2 weeks), so hopefully I won't have any more of these types of issues.
[ September 04, 2008: Message edited by: Heather Rose ]
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30057
    
149

Originally posted by Heather Rose:
If anyone was interested, I found out the problem. This was a problem with...

Thanks for sharing the solution for others who encounter this problem in the future.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 'ant' not recognized...
 
Similar Threads
unable to run ant after unzipping binary distrbtn
problem in defineing ANT_HOME
NoClassDefFoundError..
ant 1.6.0 bin distribution not working
Issues Re Environment and Path Variables In Windows XP For JBoss and ANT