You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2001/12/06 18:42:02 UTC

DO NOT REPLY [Bug 5307] New: - java task: JVM mode cannot be changed while using the jar attribute

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5307>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5307

java task: JVM mode cannot be changed while using the jar attribute

           Summary: java task: JVM mode cannot be changed while using the
                    jar attribute
           Product: Ant
           Version: 1.4.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: christophe.aubry@temis-group.com


I tried to make some tests on a client/server application, using Ant.
I used the JAVA task to run different test processes.
I also want to select different JVM modes, so I use a JVMARG nested element to 
set -hotspot or -server mode.

The problem is the following: if I use the JAR attribute, Ant returns an error 
while launching the JVM (unrecognized option: -server). If I use the CLASSPATH 
and CLASSNAME attributes instead, the task is executed normally (mode of the 
JVM is correct).

Then,

        <java jar="MyServer.jar"
              fork="true">
          <jvmarg value="-server"/>
          ...
        </java>

must be replaced with

        <java classname="MyServer"
              classpath="MyServer.jar"
              fork="true">
          <jvmarg value="-server"/>
          ...
        </java>

I think that the correction is minor but it takes some time to find this issue!

Hoping this can help.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>