• 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 giving package does not exists error

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm compiling a java classs say "JAVACLASS1" in package "com.test.codegen" and another java class "JAVACLASS2" in package "com.test.locator" using ant task. My JAVACLASS2 uses class from 3rd package say "com.test.components". The problem is while compiling JAVACLASS2 i'm getting package not found error for com.test.package3 import. Please help me in resolving this. here is my ant script.

<javac debug="on" memoryMaximumSize="512m" memoryInitialSize="256m" fork="true"
destdir="${build.dir.classes}" nowarn="true"
sourcepath=""
srcdir="${java.src.dir}"
classpathref="my.classpath">
<include name="**/codegen/**"/>
<include name="com/tmobile/retail/locator/**"/>
</javac>

Thanks and regards
Harish Malavade(harish.malavade@gmail.com)
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Without the definition of my.classpath (the value of classpathref), we can't be of much help. But apparently it doesn't include the directory where com.test.package3 is located.

Also, it would help if you provided full paths for both classes.
 
The only cure for that is hours of television radiation. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic