Actually, on further experimentation, the Linux vs Windows/Solaris differences appear to be due to other environmental differences. What is happening in fact is that for all OSes, an empty argument still appears to be treated by the java executable as the class to run, which it can't find, same as if you had pass a nonexistent classname in. So using
<jvmarg value=""/>
results in
[junit] Exception in thread "main" java.lang.NoClassDefFoundError:
while
<jvmarg value="whatever"/>
results in the more understandable
[junit] Exception in thread "main" java.lang.NoClassDefFoundError: whatever


What threw us off was the fact that the error message was so non-descriptive; we never thought the empty arg was a problem and was causing this, but assumed it was something else.

Maybe it is worth having ant not allow empty arguments to avoid this kind of pain for others...


Martin Gainty wrote:

Colin

In defence of the Ant null jvmarg
Have you queried Lunix Support on this???
Regards,

Martin Gainty



>From: Colin Sampaleanu >Reply-To: "Ant Developers List" >To: Ant Developers List >Subject: JUnit task barfs on Linux on empty jvmarg value >Date: Tue, 03 Sep 2002 18:43:52 -0400 >

> >This one hit us maybe a year and a half ago, but we only figured it >out now. If you call JUnit with fork="yes", and specify a blank >jvmarg > >you will get > [junit] Exception in thread "main" >java.lang.NoClassDefFoundError: >with no stack trace or other information. You may ask why we would >call it with a blank value, but in fact we had a property in there >that would sometimes get expanded to something, and sometimes to >nothing. > >This is not a problem on Windows or Solaris (have not tried Solaris >for a while). > >Note that I have not tried the recently release 1.5.1 beta, but I >did not see this on the list of changes. > > > >-- >To unsubscribe, e-mail: > >For additional commands, e-mail: >

------------------------------------------------------------------------
Chat with friends online, try MSN Messenger: Click Here <http://g.msn.com/1HM1ENUS/c144??PS=47575>





-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



Reply via email to