You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by deathsand <de...@hanmail.net> on 2010/10/26 08:05:49 UTC

i want use recent classes

java : 1.6.0_07 jdk
ant : 1.6.5

Root
 -Source1
   -src
   -bin
 -Source2
  -src
  -bin
 -Source3
  -src
  -bin

If i'll compile Source3, that code needs (source1 and source2)'s class
files.

so i compiled like this :

<path id="fwj">
      <pathelement path="${java.class.path}/" />
      <fileset dir="C:\Program Files\Java\jdk1.6.0_07\jre\lib">
        <include name="*.jar" />
      </fileset>
      <fileset dir="C:\Program Files\Java\jdk1.6.0_07\jre\lib\ext">
        <include name="*.jar" />
      </fileset>
      <pathelement location="${base.dir}/ClassLoader/bin" />
      <pathelement location="${base.dir}/CSS/bin" />
      <pathelement location="${base.dir}/CSSConnectivity/bin" />
      <pathelement location="${base.dir}/CSSDaemon/bin" />
      <pathelement location="${base.dir}/CSSTesterV2/bin" />
      <pathelement location="${base.dir}/Data/bin" />
      <pathelement location="${base.dir}/Framework/bin" />
      <pathelement location="${base.dir}/FrameworkAPI/bin" />
      <pathelement location="${base.dir}/LogUtil/bin" />
      <pathelement location="${base.dir}/Sample/TickSample/bin" />
      <pathelement location="${base.dir}/Service/bin" />
      <pathelement location="${base.dir}/STA/bin" />
      <pathelement location="${base.dir}/Supervisor/bin" />
      <pathelement location="${base.dir}/SystemConnectivity/bin" />
      <pathelement location="${base.dir}/Utility/bin" />
      <pathelement location="${base.dir}/VersionMananger/bin" />
      <pathelement location="${base.dir}/WorkflowEngine/bin" />
</path>
<javac destdir="Source1/bin" executable="C:/Program
Files/Java/jdk1.6.0_07/bin/javac" classpathref="fwj" debug="on"
includeantruntime="false">
  <src path="Source1/src" />
  <include name="**/*.java" />
</java>
<javac destdir="Source2/bin" executable="C:/Program
Files/Java/jdk1.6.0_07/bin/javac" classpathref="fwj" debug="on"
includeantruntime="false">
  <src path="Source2/src" />
  <include name="**/*.java" />
</java>
<javac destdir="Source3/bin" executable="C:/Program
Files/Java/jdk1.6.0_07/bin/javac" classpathref="fwj" debug="on"
includeantruntime="false">
  <src path="Source3/src" />
  <include name="**/*.java" />
</java>

but it has errors so i can't build complete.

when ant script compiled source3 line, i think they can't find source1 and
source2's class files.

ant alert "cannot find symbol" errors.

plz help me. what can i do fix this errors.

-- 
View this message in context: http://ant.1045680.n5.nabble.com/i-want-use-recent-classes-tp3236592p3236592.html
Sent from the Ant - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Re: i want use recent classes

Posted by Stefan Bodewig <bo...@apache.org>.
On 2010-10-26, deathsand wrote:

> java : 1.6.0_07 jdk
> ant : 1.6.5

> Root
>  -Source1
>    -src
>    -bin
>  -Source2
>   -src
>   -bin
>  -Source3
>   -src
>   -bin

> If i'll compile Source3, that code needs (source1 and source2)'s class
> files.

> so i compiled like this :

> <path id="fwj">

... way too long to quote ...  does NOT contain Source1/bin or Source2/bin

> </path>

> <javac destdir="Source1/bin" executable="C:/Program
> Files/Java/jdk1.6.0_07/bin/javac" classpathref="fwj" debug="on"
> includeantruntime="false">
>   <src path="Source1/src" />
>   <include name="**/*.java" />
> </java>
> <javac destdir="Source2/bin" executable="C:/Program
> Files/Java/jdk1.6.0_07/bin/javac" classpathref="fwj" debug="on"
> includeantruntime="false">
>   <src path="Source2/src" />
>   <include name="**/*.java" />
> </java>
> <javac destdir="Source3/bin" executable="C:/Program
> Files/Java/jdk1.6.0_07/bin/javac" classpathref="fwj" debug="on"
> includeantruntime="false">
>   <src path="Source3/src" />
>   <include name="**/*.java" />
> </java>

> but it has errors so i can't build complete.

It's hard to diagnose this when you don't tell us what sort of errors
you see.

> when ant script compiled source3 line, i think they can't find source1 and
> source2's class files.

It certainly can't since you don't tell it where to find them.  Try

<javac destdir="Source3/bin"
       executable="C:/Program Files/Java/jdk1.6.0_07/bin/javac"
       debug="on"
       includeantruntime="false">
  <src path="Source3/src" />
  <classpath>
    <path refid="fwj"/>
    <pathelement location="Source1/bin"/>
    <pathelement location="Source2/bin"/>
  </classpath>
</java>

instead

> ant alert "cannot find symbol" errors.

Is this related to your problem?

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org