When using a 1.4 compiler, first, you
must compile source with -source 1.4:
javac -source 1.4 <source file(s)>
Then, you use the command line switches to enable/disable assertions for all or a subset of classes/packages at runtime. For example:
java -ea:com.pkgA... -da:com.pkgA.ClassB MainClass
This says, "Run MainClass with assertions enabled in com.pkgA and all of it's subpackages, but disabled in the com.pkgA.ClassB class."
Hope that helps.