ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Archie Cobbs <archie.co...@gmail.com>
Subject Re: Ant picks class files from current directory rather than provided jar in classpath
Date Fri, 19 Feb 2010 22:44:30 GMT
On Fri, Feb 19, 2010 at 4:42 PM, krats <princekarthik@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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message