posted 19 years ago
Hi,
Syntax for assertions is:
java (-da|-ea)(:class to enable or disable assertions) [class to run]
(items in the '()' are optional).
The first one:
java -da com.blah.MyClass is the same as running java com.blah.MyClass.
Assertions are disabled by default, so the -da by itself is superfluous.
The second one:
java -da:com.blah.MyClass
would not work at all because you need to tell it which class to run if you use the -da: syntax. All -da:<class_name> does is to disable assertions for <class_name>. You still need to tell it which class to run.
i.e. you would need to do somthing like this.
java -da:com.blah.MyClass com.blah.MyClass
Once this is done all the statements below achieve exactly the same thing, in that they disable assertions in the class com.blah.MyClass
java -da:com.blah.MyClass com.blah.MyClass
java -da com.blah.MyClass
java com.blah.MyClass
Hope that helps