This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Ant, Maven and Other Build Tools and the fly likes ant giving package does not exists error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Engineering » Ant, Maven and Other Build Tools
Bookmark "ant giving package does not exists error" Watch "ant giving package does not exists error" New topic
Author

ant giving package does not exists error

Harish Malavade
Greenhorn

Joined: Jun 08, 2011
Posts: 5
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)
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5850
    
    7

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.


JBoss In Action
 
jQuery in Action, 2nd edition
 
subject: ant giving package does not exists error