File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 5827
    
    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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ant giving package does not exists error