File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 1666
    
    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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAVA Assertions
 
Similar Threads
Assertion
Could not create the java vitrual machine?
executing java program whose class file is in diff path
Java, Netbeans work fine but no javac
JDK 1.1.6 on P4 PC is not working