You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "John W. Warner" <jw...@ccs.nrl.navy.mil> on 2002/04/18 21:38:35 UTC

Need classpath help.

I have a project that works great on W2K. I moved the project on to a
Solaris 2.6 box and changed the build.xml file accordingly and I'm
getting the following error;
 
[javac]
/afs/cmf/users/jwarner/EZM/src/mil/nrl/ezmoney/common/security/Encryptio
n.java:8: cannot resolve symbol
    [javac] symbol  : class BI  
    [javac] location: package core
    [javac] import cryptix.util.core.BI;         // Cryptix
    [javac]                          ^
 
There are more that I'm not including because they are the same error,
but basically, it doesn't seem to be finding the crypitx32.jar file. So,
I looked at the results of "ant -debug" and it looks as if everything in
the build.xml file is parsing right and its showing the full directory
path for the cryptix library and it's correct. The only thing that seems
weird to me is that the java.class.path doesn't show the cryptix library
listed and I'm thinking that it should.
Anyway, does anyone have an idea or know what could be wrong here?
 
Here are the relevant pieces of my build.xml file;
 
<project name="EZM" default="build" basedir=".">
    <target name="init">
        <tstamp/>
    </target>

 
   <property name="project" value="EZM" />
  <property environment="env" />
  <property name="build.sysclasspath" value="last"/>
  <property name="path" value="${user.home}/${project}"/>
  <property name="3rdPartyLibs" value="${path}/3rdParty" />
  <property name="build"   value="${path}/build" />
 
  <path id="classpath.path">
      <fileset dir="${env.JAVA_HOME}/lib">
        <include name="*.jar">
      </fileset>
      <fileset dir="${env.JAVA_HOME}/jre/lib">
        <include name="rt.jar">
      </fileset>
      <fileset dir="${3rdPartyLibs}/cryptix">
        <include name="cryptix32.jar">
      </fileset>
  </path>
                             
  <target name="build" depends="prepare" description="Blah">
       <javac fork="yes"
                 srcdir="src"
                 destdir="${build}/WEB-INF/classes"
                 classpath="${3rdPartyLibs}/cryptix/cryptix32.jar">

            <include name="**/*.java">
            <classpath refid="classpath.path" />
        </javac>
   . <!-bunch of copy commands here -->
  </target>
</project>
 
Also, Question 2
How do I do something like the following;
If OS="SunOs" then basepath = . 
If OS="Windows NT" then basepath = .
 
Thanks all.. in advance..
-          John
 

Re: Need classpath help.

Posted by Diane Holt <ho...@yahoo.com>.
--- "John W. Warner" <jw...@ccs.nrl.navy.mil> wrote:
> I have a project that works great on W2K. I moved the project on to a
> Solaris 2.6 box and changed the build.xml file accordingly and I'm
> getting the following error;
>  
> [javac]
> /afs/cmf/users/jwarner/EZM/src/mil/nrl/ezmoney/common/security/Encryptio
> n.java:8: cannot resolve symbol
>     [javac] symbol  : class BI  
>     [javac] location: package core
>     [javac] import cryptix.util.core.BI;         // Cryptix
>     [javac]                          ^

Are you sure the jar file is where you've said it is? If it is, have you
'tf'd it to make sure that it has that particular class in it?

> The only thing that seems weird to me is that the java.class.path
> doesn't show the cryptix library listed and I'm thinking that it should.

It wouldn't be in java.class.path -- it should be in the list following
the '-classpath' flag on the compile command-line (you only need to run
Ant with '-verbose' to see that). If it's not showing up there, then the
file doesn't exist, since non-existent jars will be (silently) dropped.
(BTW: Is there some reason you're including it in both the fileset and
specifying it in the 'classpath' attribute as well?)

> Also, Question 2
> How do I do something like the following;
> If OS="SunOs" then basepath = . 
> If OS="Windows NT" then basepath = .

See the <condition> task's nested <os> element.

Diane

=====
(holtdl@yahoo.com)



__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>