ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yannick Menager" <yannick.mena...@db.com>
Subject Re: the java task
Date Tue, 04 Jul 2000 10:36:17 GMT


Couldn't somebody patch that task so that it uses a classloader to loads the indicated classpath.

I'd do it myself if I had time to breathe :-)





Ken Wood <kwood@i2.com> on 04/07/2000 04:54:38

Please respond to ant-dev@jakarta.apache.org

To:   ant-dev@jakarta.apache.org
cc:
Subject:  Re: the java task


That is correct - the classpath in effect at the time you
do a java task with fork="no" is the classpath that
Ant was invoked with. You are just running your task
within the JVM that is running ant. But if you set fork="yes"
then you are starting a new JVM with the specified args and
classpath.

"Allen, Michael B (RSCH)" wrote:

> Hello,
>
> I'm having a little trouble with the java task. If I have a target like
> below it doesn't work:
>
>      86   <target name="run_http">
>      87     <java classname="com.sun.jini.tool.ClassServer"
>      88        fork="no"
>      89        jvmargs=""
>      90        classpath="lib/jini1_0_1/lib/tools.jar"
>      91        args="-dir ${codebase.dir} -port ${codebase.port}"/>
>      92   </target>
>
> [miallen@prodlinux swooshmail]$ ./bin/build run_http
> Buildfile: etc/build.xml
> Project base dir set to: /home/miallen/NYU/vjkproj/swooshmail
> Executing Target: run_http
>
> BUILD FATAL ERROR
>
> etc/build.xml:91: Could not find com.sun.jini.tool.ClassServer. Make sure
> you have it in your classpath
>
> [miallen@prodlinux swooshmail]$ ls lib/jini1_0_1/lib/
> jini-core.jar         jini-examples.jar  mahalo-dl.jar  reggie-dl.jar
> sun-util.jar
> jini-examples-dl.jar  jini-ext.jar       mahalo.jar     reggie.jar
> tools.jar
> [miallen@prodlinux swooshmail]$ echo $CLASSPATH
> /usr/local/javalibs/classes111.zip
>
> But if I change fork="yes" then it does work. So I gather the classpath
> attribute really has no effect if fork="no" just like the jvm and jvmargs
> attributes ehh?
>
> Thanks,
>
> Michael B. Allen
> Michael_B_Allen@ml.com
> http://jcifs.samba.org - MS Windows File and Print Sharing API in 100% Java








Mime
View raw message