You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Miten Mehta <mi...@hotmail.com> on 2000/08/03 19:42:46 UTC

java fails (could not find class)

Hello,

I am trying to use java on winnt with ant but it complains as:

D:\work\july2000>ant run
Buildfile: build.xml

init:

prepare:

compile:

run:

BUILD FAILED

build.xml:31: Could not find QSReport. Make sure you have it in your 
classpath

Total time: 1 seconds

Here is run target:

<target name="run" depends="compile">
    <java classname="QSReport" args="report.properties">
      <classpath>
        <pathelement  ocation="d:\oracle\ora81jdbc\lib\classes111.zip"/>
        <pathelement  path="d:\work\july2000"/>
      </classpath>
    </java>
</target>



FYI,

D:\work\july2000>ant compile
Buildfile: build.xml

init:

prepare:

compile:

BUILD SUCCESSFUL

Total time: 1 seconds


targets:
  <target name="init">
    <tstamp/>
    <property name="build" value="."/>
    <property name="src" value="."/>
    <property name="dist"  value="."/>
    <filter token="version" value="1.0.0"/>
    <filter token="year" value="2000"/>
  </target>

  <target name="prepare" depends="init">
    <mkdir dir="${build}" />
  </target>

  <target name="compile" depends="prepare">
    <javac srcdir="${src}" destdir="${build}" filtering="on" 
includes="QS*.java">
      <classpath path="d:\work\july2000"/>
    </javac>
  </target>

  <target name="dist" depends="compile">
    <mkdir dir="${dist}"/>
    <jar jarfile="${dist}/qs${DSTAMP}.jar" basedir="${build}" 
includes="QS*.class" />
  </target>

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com


Re: java fails (could not find class)

Posted by Harald Lucke <HL...@SEB-Karlsburg.de>.
Miten Mehta wrote:

> Hello,
>
> I am trying to use java on winnt with ant but it complains as:
>
> D:\work\july2000>ant run
> Buildfile: build.xml
>
> init:
>
> prepare:
>
> compile:
>
> run:
>
> BUILD FAILED
>
> build.xml:31: Could not find QSReport. Make sure you have it in your
> classpath
>
> Total time: 1 seconds
>
> Here is run target:
>
> <target name="run" depends="compile">
>     <java classname="QSReport" args="report.properties">
>       <classpath>
>         <pathelement  ocation="d:\oracle\ora81jdbc\lib\classes111.zip"/>
>         <pathelement  path="d:\work\july2000"/>
>       </classpath>
>     </java>
> </target>
>
> FYI,
>
> D:\work\july2000>ant compile
> Buildfile: build.xml
>
> init:
>
> prepare:
>
> compile:
>
> BUILD SUCCESSFUL
>
> Total time: 1 seconds
>
> targets:
>   <target name="init">
>     <tstamp/>
>     <property name="build" value="."/>
>     <property name="src" value="."/>
>     <property name="dist"  value="."/>
>     <filter token="version" value="1.0.0"/>
>     <filter token="year" value="2000"/>
>   </target>
>
>   <target name="prepare" depends="init">
>     <mkdir dir="${build}" />
>   </target>
>
>   <target name="compile" depends="prepare">
>     <javac srcdir="${src}" destdir="${build}" filtering="on"
> includes="QS*.java">
>       <classpath path="d:\work\july2000"/>
>     </javac>
>   </target>
>
>   <target name="dist" depends="compile">
>     <mkdir dir="${dist}"/>
>     <jar jarfile="${dist}/qs${DSTAMP}.jar" basedir="${build}"
> includes="QS*.class" />
>   </target>
>
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

Good morning,

the project has a common basdir!
I had also this problems -> fork=yes and a description of the classpath ->
all is running

Harald

RE: java fails (could not find class)

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
Is there a package statement in QSRepoert.java? What package is it in?

--
Conor MacNeill
conor@cortexebusiness.com.au
Cortex eBusiness 
http://www.cortexebusiness.com.au

> -----Original Message-----
> From: Miten Mehta [mailto:miten_s_mehta@hotmail.com]
> Sent: Friday, 4 August 2000 3:43
> To: ant-user@jakarta.apache.org
> Subject: java fails (could not find class)
> 
> 
> Hello,
> 
> I am trying to use java on winnt with ant but it complains as:
> 
> D:\work\july2000>ant run
> Buildfile: build.xml
> 
> init:
> 
> prepare:
> 
> compile:
> 
> run:
> 
> BUILD FAILED
> 
> build.xml:31: Could not find QSReport. Make sure you have it in your 
> classpath
> 
> Total time: 1 seconds
> 
> Here is run target:
> 
> <target name="run" depends="compile">
>     <java classname="QSReport" args="report.properties">
>       <classpath>
>         <pathelement  ocation="d:\oracle\ora81jdbc\lib\classes111.zip"/>
>         <pathelement  path="d:\work\july2000"/>
>       </classpath>
>     </java>
> </target>
> 
> 
> 
> FYI,
> 
> D:\work\july2000>ant compile
> Buildfile: build.xml
> 
> init:
> 
> prepare:
> 
> compile:
> 
> BUILD SUCCESSFUL
> 
> Total time: 1 seconds
> 
> 
> targets:
>   <target name="init">
>     <tstamp/>
>     <property name="build" value="."/>
>     <property name="src" value="."/>
>     <property name="dist"  value="."/>
>     <filter token="version" value="1.0.0"/>
>     <filter token="year" value="2000"/>
>   </target>
> 
>   <target name="prepare" depends="init">
>     <mkdir dir="${build}" />
>   </target>
> 
>   <target name="compile" depends="prepare">
>     <javac srcdir="${src}" destdir="${build}" filtering="on" 
> includes="QS*.java">
>       <classpath path="d:\work\july2000"/>
>     </javac>
>   </target>
> 
>   <target name="dist" depends="compile">
>     <mkdir dir="${dist}"/>
>     <jar jarfile="${dist}/qs${DSTAMP}.jar" basedir="${build}" 
> includes="QS*.class" />
>   </target>
> 
> ________________________________________________________________________
> Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com
> 
>