File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes IDEs, Version Control and other tools and the fly likes Enabling assertions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Enabling assertions" Watch "Enabling assertions" New topic

Enabling assertions

V Bose
Ranch Hand

Joined: Jul 10, 2003
Posts: 113
I have set the compliance setting to 1.4, but I am not able to run and trigger an assertion error. Even if the assertion fails, the console does not report the assertion failure. Is there some option in eclipse which I am not setting properly?
Thanks in advance...
Peter Reinhardt
Ranch Hand

Joined: Aug 02, 2002
Posts: 57
Just add "-enableassertions" to the VM arguments. I haven't seen a preferences setting for enabling assertions.

SCJP 1.2, SCJD, SCEA, IBM 484, Weblogic 7
Consider Paul's rocket mass heater.
subject: Enabling assertions
It's not a secret anymore!