This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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 OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 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
wood burning stoves
subject: Enabling assertions
It's not a secret anymore!