You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Archie Cobbs <ar...@gmail.com> on 2010/02/19 23:44:30 UTC

Re: Ant picks class files from current directory rather than provided jar in classpath

On Fri, Feb 19, 2010 at 4:42 PM, krats <pr...@gmail.com> wrote:

> if I do
>
> javac -classpath lib\f1.jar f2\f2.java
>
> then, it doesnt create f1\f1.class. Instead it uses the import f1 class
> from
> the jar file. The class file for f1 gets created only when I the javac task
> from ant. Thats why I was wondering if its an ant issue.
>

You are not asking javac to compile f1.java with that command line... you
are only asking it to compile f2.java. Try this instead:

  javac -classpath lib\f1.jar f1/f1.java f2\f2.java

-Archie

-- 
Archie L. Cobbs