Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

ant file not running

 
samdeep aarzoo
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.



C:\sandeep>cd src

C:\sandeep\src>ant
Buildfile: build.xml

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

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

jar:
[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

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

main:

BUILD SUCCESSFUL
Total time: 0 seconds
C:\sandeep\src>



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
Bartender
Posts: 10336
Eclipse IDE Hibernate Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the oata package included in the classpath attribute of your Java task?
 
samdeep aarzoo
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Marshal
Posts: 34401
346
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sandeep,
Can you post the run task from your Ant build file?
 
samdeep aarzoo
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi Jeanne

now its working
i make correction in deployed directory structure in build xml file
thanks for looking my problem .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic