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.