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 Assertion 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 "Assertion" Watch "Assertion" New topic


tushar fasate

Joined: May 19, 2008
Posts: 7
can anybody tell me how to enable assertions in eclipse?
Vinayagar Karpagam
Ranch Hand

Joined: Apr 09, 2006
Posts: 72
I hope adding -ea as VM arg in the launch configuration and setting the source code level to >= 1.4 should be enough to enable assertions.
Deepak Bala

Joined: Feb 24, 2006
Posts: 6662

Open the run dialog and modify the VM arguments under the 'Arguments' tab. I would suggest that you use notepad instead of eclipse, since the IDE helps you autocomplete almost everything

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
I agree. Here's the link:
subject: Assertion
It's not a secret anymore!