This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes Problem in runnin ant build file from eclipse Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "Problem in runnin ant build file from eclipse" Watch "Problem in runnin ant build file from eclipse" New topic
Author

Problem in runnin ant build file from eclipse

Hemant Agarwal
Ranch Hand

Joined: Nov 21, 2005
Posts: 138
When I right click my build file from eclipse and select run as ant build, I am getting error dialog box "Could not find the main class. Program will exit". What could be the possible reasons?

Thanks,
Hemant Agarwal
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

Hemant,
Maybe the class isn't in the classpath?

Can you post the build.xml here? This will help people give you a more useful and specific answer.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Matt Harrah
Ranch Hand

Joined: Aug 05, 2006
Posts: 54
Check your ant home setting in eclipse
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: Problem in runnin ant build file from eclipse
 
jQuery in Action, 3rd edition