ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Laconia Data Systems" <>
Subject Re: Classpath Issue - Not sure why it isn't being picked up
Date Wed, 06 Oct 2004 13:29:39 GMT
1) compiling
go to C:\
dir /X
note the short name of the folder for folder 'PCC Source'
(e.g. on my box C:\Program Files shortened name is C:\PROGRA~1)
substitute all occurrences of 'PCC Source' with the folders shortened name

2)resolving classepath issues
the default class resolution is CLASSPATH/package name so for example if I
have the classpath specified as
(classpath is set to current folder first..with the remainder of CLASSPATH
AND my base folder (where I am compiling ) is ${basedir}\PCC Source\CAN
then the *.classes within package esolutions.util located at ${basedir}\PCC
will be found
Makes sense???
----- Original Message -----
From: "Grand Cheng" <>
To: "Ant Users List" <>
Sent: Wednesday, October 06, 2004 9:08 AM
Subject: RE: Classpath Issue - Not sure why it isn't being picked up

Hi Everyone,

I appreciate the help.

Unfortunately I still can't seem to get the compile going.  Martin, you
mentioned that it would be helpful if I provided the package names, so
here is the build file itself, and the problems I am encountering.
Maybe I am compiling from the wrong base folder?


<?xml version="1.0"?>

<project name="PCC Build File" default="Compile" basedir="c:\" >

 <property name="stuff" location="esolutions" />
 <property name="src1" location="PCC Source\CAN\esolutions\common" />
 <property name="dest_compiled" location="esolutions_compiled" />

 <path id="pcc.path">
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\adt" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\ap" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\applet" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\ar" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\base" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\care" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\chart" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\CHART DOC"
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\client" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\comm" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\common" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\contact" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\dbmerge" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\cl" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\glap" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\help" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\html" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\internal"
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\quality" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\sec" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\servlet" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\staff" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\trust" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\util" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\util\care"
 <pathelement location="${basedir}\PCC
Source\CAN\esolutions\util\quality" />
 <pathelement location="${basedir}\PCC
Source\CAN\esolutions\util\remote" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\util\trust"
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\work" />
 <pathelement location="${basedir}\PCC Source\CAN\esolutions\www" />

 <target name="Compile">
  <javac srcdir="${src1}" />
  <classpath refid="${pcc.path}" />


****************************End of Build


C:\Ant\bin>ant -f build2.xml
Buildfile: build2.xml

    [javac] Compiling 12 source files
    [javac] C:\PCC Source\CAN\esolutions\common\
package esolutions.util does not exist
    [javac] import esolutions.util.*;
    [javac] ^
    [javac] C:\PCC Source\CAN\esolutions\common\
package esolutions.base does not exist
    [javac] import esolutions.base.*;
    [javac] ^
    [javac] C:\PCC Source\CAN\esolutions\common\
package esolutions does not exist
    [javac] import esolutions.*;
    [javac] ^
    [javac] C:\PCC Source\CAN\esolutions\common\
cannot res
olve symbol

****************************End of Errors*******************************

Thanks to all that have helped.

-----Original Message-----
From: Laconia Data Systems []
Sent: Wednesday, October 06, 2004 7:31 AM
To: Ant Users List
Subject: Re: Classpath Issue - Not sure why it isn't being picked up

Keep in mind that if your base folder is named 'base' and
your package name is named 'foo' then you need to compile the source
folder 'base' which referennces package (folder) foo
Since your email did not provide package names I do not know what the
specific names would be
----- Original Message -----
From: "Grand Cheng" <>
To: <>
Sent: Tuesday, October 05, 2004 4:22 PM
Subject: Classpath Issue - Not sure why it isn't being picked up


I am a newbie to Ant so I appreciate any help you can lend me.

I am trying to compile a fairly large project, which has multiple
packages, and has referencing between them.  So when I first created the
build file and ran it, I received a slew of "package not found" , and
"cannot resolve symbol"

I then added the following to my build file.

<path id="mypath.path">

<pathelement path ="${basedir}\source\a" />

<pathelement path ="${basedir}\source\b" />

<pathelement path ="${basedir}\source\c" />


I have basically added a pathelement for every folder within my
project...just to make sure I haven't missed anything.

I have a target

<target name="CompileMyStuff">

<javac srcdir="${basedir}\source\a" />

<classpath refid="${mypath.path}" />


However, when I run this, I still receive the same "package not found" ,
and "cannot resolve symbol"

I am using Ant v. 1.6.2 and JDK 1.3.1_04

Thanks for your help

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message