You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Rob Shepherd <ro...@informatics.bangor.ac.uk> on 2004/07/14 20:02:42 UTC
including classes from same higher level package
Hello, I have split my source up into different projects
in project one i have
org/myorg/*.java
org/myorg/pkgA/*.java
org/myorg/pkgB/*.java
in another project, project 2, i have
org/myorg/pkgZ/*.java
I have an ant script to compile project 2 no probs and make jar P2.jar
but project one has small dependancy on part of project 2
so i compile with
<javac srcdir="/java/p1/src/java/" >
<classpath>
<pathelement location="/java/p2/P2.jar" />
</classpath>
</javac>
But to no avail... I get package org.myorg.pkgZ does not exist
how do I make javac see that the classes are not in the source path to be compiled, but in
the classpath as a lib.???
i've tried various attempts at includes and excludes but to no avail...
many thanks
best regards
Rob
--
/**
* Rob Shepherd,
* University Of Wales, Bangor,
* School of Informatics,
* Dean Street,
* Bangor,
* Gwynedd, UK /\ /\
* LL57 1UT / \/ \ /\
* --------------/---/ \--\----
*
* robshep@informatics.bangor.ac.uk
*
* +44 (0) 1248 38 27
*/
Re: including classes from same higher level package
Posted by Rob Shepherd <ro...@informatics.bangor.ac.uk>.
Rob Shepherd wrote:
> Hello, I have split my source up into different projects
>
> in project one i have
>
> org/myorg/*.java
> org/myorg/pkgA/*.java
> org/myorg/pkgB/*.java
>
> in another project, project 2, i have
>
> org/myorg/pkgZ/*.java
>
> I have an ant script to compile project 2 no probs and make jar P2.jar
>
> but project one has small dependancy on part of project 2
>
> so i compile with
>
> <javac srcdir="/java/p1/src/java/" >
> <classpath>
> <pathelement location="/java/p2/P2.jar" />
> </classpath>
> </javac>
>
> But to no avail... I get package org.myorg.pkgZ does not exist
>
> how do I make javac see that the classes are not in the source path to
> be compiled, but in the classpath as a lib.???
>
> i've tried various attempts at includes and excludes but to no avail...
>
> many thanks
>
> best regards
>
> Rob
>
Sorry please ignore me... a stupid mistake.
fixed now.
sorry again
Rob
--
/**
* Rob Shepherd,
* University Of Wales, Bangor,
* School of Informatics,
* Dean Street,
* Bangor,
* Gwynedd, UK /\ /\
* LL57 1UT / \/ \ /\
* --------------/---/ \--\----
*
* robshep@informatics.bangor.ac.uk
*
* +44 (0) 1248 38 27
*/