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 Assertion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring 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!