File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Reply 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
internet detective
Marshal

Joined: May 26, 2003
Posts: 26192
    
  66

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.


[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
Matt Harrah
Ranch Hand

Joined: Aug 05, 2006
Posts: 54
Check your ant home setting in eclipse
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Problem in runnin ant build file from eclipse
 
Similar Threads
Problem with Eclipse and the servicegen task of weblogic
ant junit
Eclipse and ANT
Need help to build a file using ant in eclipse
migration from netbeans to eclipse