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 | 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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30116
    
150

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
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Problem in runnin ant build file from eclipse
 
Similar Threads
ant junit
Problem with Eclipse and the servicegen task of weblogic
migration from netbeans to eclipse
Need help to build a file using ant in eclipse
Eclipse and ANT