File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Ant, Maven and Other Build Tools and the fly likes ant  file not running 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 "ant  file not running" Watch "ant  file not running" New topic

ant file not running

samdeep aarzoo
Ranch Hand

Joined: Jun 09, 2005
Posts: 160
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\sandeep>cd src

Buildfile: build.xml

[delete] Deleting directory C:\sandeep\src\build

[mkdir] Created dir: C:\sandeep\src\build\classes

[mkdir] Created dir: C:\sandeep\src\build\jar
[jar] Building MANIFEST-only jar: C:\sandeep\src\build\jar\HelloWorld.jar
[jar] Building jar: C:\sandeep\src\build\jar\HelloWorld.jar

[java] java.lang.NoClassDefFoundError: oata/HelloWorld
[java] Exception in thread "main"
[java] Java Result: 1


Total time: 0 seconds

i m trying to compile helloworld class
it is compiling fine and making a jar file
but not running
and gives error

[java] java.lang.NoClassDefFoundError: oata/HelloWorld

i have already set my classpath

in src i have build.xml and oata package(hello world class)

please help me
i dont know why it is not working
i have included tools.jar in classpath
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Is the oata package included in the classpath attribute of your Java task?

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
samdeep aarzoo
Ranch Hand

Joined: Jun 09, 2005
Posts: 160
i tried this but still it is not running

my hello world program is running in jdk
but not able to run from ant
Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33102

Can you post the run task from your Ant build file?

[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
samdeep aarzoo
Ranch Hand

Joined: Jun 09, 2005
Posts: 160
hi Jeanne

now its working
i make correction in deployed directory structure in build xml file
thanks for looking my problem .
I agree. Here's the link:
subject: ant file not running
It's not a secret anymore!