• 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
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

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: 42022
916
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 .
 
The two armies met. But instead of battle, they decided to eat some pie and contemplate this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic