This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "JAVA Assertions" Watch "JAVA Assertions" New topic
Author

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.

Regards,
Nancy
Jelle Klap
Bartender

Joined: Mar 10, 2008
Posts: 1761
    
    7

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.
 
 
subject: JAVA Assertions