ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <>
Subject RE: Re: Problem with Database connections and Classpaths
Date Tue, 08 Jun 2004 14:00:41 GMT
Hi Joanne,

Not sure whether this is your problem, but java -jar and java -classpath don't always go together.
(The Ant task is just a wrapper for these command lines).
You might try putting a Class-Path: entry into the manifest of ${utiljar}, put
both in the same directory, and see if that works.

Hope this helps,

-----Original Message-----
From: Joanne L Corless []
Sent: 04 June 2004 14:10
To: Ant Users List
Subject: Re: Re: Problem with Database connections and Classpaths

Hi Ivan,

Yes thats the gist of it - However I thought I had passed the
to <java>

My build script looks like so ~

 <path id="run.classpath">
        <pathelement path="${lib}/xalan.jar"/>
        <pathelement path="${lib}/xercesImpl.jar"/>
        <pathelement path="${lib}/xml-apis.jar"/>
        <pathelement location="${dbUtil}/"/>

  <!-- Build Targets for compile.bat -->
  <target name="runUtilities" depends="init" >
    <!-- Compile the java code from ${jsrc} into ${build} -->
    <java dir="${dbUtil}" jar="${utiljar}" failonerror="true" fork="true"
         <arg value="-encrypt"/>
      <arg value="${connectionUser}"/>
      <arg value="${connectionPassword}"/>
      <arg value="${connectionString}"/>
      <arg value="keyconfig.xml"/>

And when you run it in verbose mode you can actually see the
file on the classpath - but the utility doesn't seem to want to recognise
the files

I have found a work around - if you unzip the and jar them
into the jar file being run then it works

Joanne Corless

------ Ivan Ivanov <rambiusparkisanius () yahoo ! com> wrote:

>Hi Joanne,
>As far I undestand you wrote a class in which you make
>calls to your oracle db and you invoke it with Ant
>with <java> task. Am I right? If so you should send
>classptah attribute to <java> and add oracle jdbc
>driver in it.
>--- Joanne L Corless <> wrote:
>> Hi,
>> I am trying to develop a standalone application that
>> makes a number of
>> calls to an oracle database.
>> However although it build OK when I try to run it
>> through ant - I get a
>> ClassNotFoundException.<snip>

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

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

View raw message