H
harryos
hi
I have an application that uses some classes in jai which i have kept
in a lib directory.I used this build script to compile and run the
application
<property name="main-class" value="mypack.MyApp"/>
<path id="myclasspath">
<fileset dir="lib" includes="**/*.jar"/>
</path>
<path id="application" location="${dist.dir}/myapp.jar"/>
<target name="compile" depends="init">
<javac srcdir="src" destdir="${classes.dir}"
classpathref="myclasspath"/>
</target>
<target name="run" depends="jar">
<java fork="true" classname="${main-class}">
<classpath>
<path refid="myclasspath"/>
<path refid="application"/>
</classpath>
</java>
</target>
....
when i run ant ,the compile is done without any error.But the run
target causes an error>>
[java] Exception in thread "main" java.lang.NoClassDefFoundError:
javax/media/jai/OperationRegistrySpi
The OperationRegistrySpi.class is present in javax/media/jai in
jai_core.jar in my lib directory.
I am working on a WinXP machine and don't have a CLASSPATH variable in
env variables.All classpath info is supposed to be given in the ant
script.
I moved this application to a fresh machine where jdk and ant are
installed and ran the script.There, my application is running without
any error!!
Can someone help me find out why this is happening in my machine?I
have NetBeans and JEE5 installed in my machine .Is that any reason for
this classpath problem?
thanks
harry
I have an application that uses some classes in jai which i have kept
in a lib directory.I used this build script to compile and run the
application
<property name="main-class" value="mypack.MyApp"/>
<path id="myclasspath">
<fileset dir="lib" includes="**/*.jar"/>
</path>
<path id="application" location="${dist.dir}/myapp.jar"/>
<target name="compile" depends="init">
<javac srcdir="src" destdir="${classes.dir}"
classpathref="myclasspath"/>
</target>
<target name="run" depends="jar">
<java fork="true" classname="${main-class}">
<classpath>
<path refid="myclasspath"/>
<path refid="application"/>
</classpath>
</java>
</target>
....
when i run ant ,the compile is done without any error.But the run
target causes an error>>
[java] Exception in thread "main" java.lang.NoClassDefFoundError:
javax/media/jai/OperationRegistrySpi
The OperationRegistrySpi.class is present in javax/media/jai in
jai_core.jar in my lib directory.
I am working on a WinXP machine and don't have a CLASSPATH variable in
env variables.All classpath info is supposed to be given in the ant
script.
I moved this application to a fresh machine where jdk and ant are
installed and ran the script.There, my application is running without
any error!!
Can someone help me find out why this is happening in my machine?I
have NetBeans and JEE5 installed in my machine .Is that any reason for
this classpath problem?
thanks
harry