Re: [Simpleweb-Support] simpleweb from ant
Brought to you by:
niallg
From: Niall G. <nia...@an...> - 2004-02-27 10:30:13
|
Hi, >When I set the classpath in the ant junit target - I am hit with "class not found" errors. But when I export CLASSPATH I am able to get past this? What is the difference? I would like to not have to set the CLASSPATH environment variable. > The classes are loaded from a URLClassLoader which inherits the classpath of the system ClassLoader. You can specify to the LoaderEngine where to load the clases from, however the system ClassLoader should be able to cope. If you can could you provide more details as to how junit is specifying the classpath. > >When I do set the CLASSPATH - I get this error: >: simple.http.load.LoadingException: java.lang.NoSuchMethodException: com.etrade.gatewaytest.SimpleHttp.<init>(simple.http.serve.Context) > You should recompile everything and try this again, this seems to be a Java Reflection error, could you possibly attach some line numbers so I can have a look. > >As an aside - I was not able to run the example java classes with 3.2.3 - had rmi stub class not found errors. I don't know if anyone else has seen this. Also - the archive does not seem to be working. > Try the attacted ANT build file to build Simple, beware though it creates and deletes a build/ directory so if you have such a directory you sould edit this. Niall <?xml version="1.0"?> <project name="Simple" default="core" basedir="."> <target name="init"> <property name="source" value="source"/> <property name="build" value="build"/> <property name="lib" value="lib"/> <property name="jar" value="jar"/> </target> <target name="clean" depends="init"> <delete dir="${build}"/> </target> <target name="prepare" depends="clean"> <mkdir dir="${build}"/> <mkdir dir="${jar}"/> </target> <target name="core" depends="prepare"> <property name="version" value="2.3.3"/> <javac srcdir="${source}" destdir="${build}"> <classpath> <fileset dir="${lib}"> <include name="**/*.jar"/> </fileset> </classpath> </javac> <rmic classname="simple.http.load.LoaderStub" base="${build}"/> <delete includeemptydirs="true"> <fileset dir="${build}"> <exclude name="simple/http/*"/> <exclude name="simple/util/*"/> </fileset> </delete> <jar jarfile="${jar}/simple-${version}.jar" basedir="${build}"/> <delete dir="${build}"/> </target> </project> |