• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

ant file not running

 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 .
 
Farmers know to never drive a tractor near a honey locust tree. But a tiny ad is okay:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic