File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes JAVA Assertions Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JAVA Assertions" Watch "JAVA Assertions" New topic

JAVA Assertions

Nancy Antony
Ranch Hand

Joined: Sep 06, 2007
Posts: 145

I installed JDK6. And when I write a simple program with assertion it neither works in command prompt nor in Netbeans6.9. I think if it will work in command prompt it will work in JDK. I tried java -ea both in command prompt as well as in Netbeans VM options. Any idea why its not working.

Jelle Klap

Joined: Mar 10, 2008
Posts: 1914

Maybe the assert condition simply isn't violated?
Some relevant code and the exact command-line invocation might help shed some light on things.

Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
I agree. Here's the link:
subject: JAVA Assertions
It's not a secret anymore!