There is no such thins as "enabling/disabling assertions at compile time".
You may be confused by how compilers treat the "assert"
word at compile time.
With Java SE 1.3 and earlier, the word "assert" is not reserved one, i.e. can be used as variable name.
With Java SE 1.4 and later (including Java SE 7) the word "assert" is reserved one, and *always* will be used for assertions.
So, if you need to compile Java source code which contains variable names with "assert" in Java SE 7, you need to tell compiler to treat source code as old one, and you can do it with the "-source" argument:
But this is not "disabling assertions" activity, this is "informing compiler to treat assert as valid variable name" activity.
HTH,
MZ