Computer Science Canada

Enabling Assertions in JCreator

Author:  Regeane [ Sat May 05, 2007 1:43 pm ]
Post subject:  Enabling Assertions in JCreator

In the CS course I'm taking (134 @ UW), we're required to enable assertions. Of course, the school is using DrJava, but last term I decided I didn't really like it and would rather stick with JCreator.
From searching around online in various places, I have figured out that there is a parameter to be added to the compiler parameter list (-ea or -enableassertions), but it doesn't seem to be working. I believe it may be an issue with the order of the parameters, but I can't find anything online with the order specified.
Thanks in advance for any help/ideas given...

Author:  Ultrahex [ Sun May 06, 2007 1:54 pm ]
Post subject:  Re: Enabling Assertions in JCreator

yes, all parameters on a java runtime are suppose to be put before
for example:
java –ea MyFile
so if your compile is
javac MyFile.java
then run is
java -ea MyFile
I've read something like the following somewhere, but i do not think it is needed
javac –source 1.4 MyFile.java


: