I am developing a web application using Eclipse and the server is JBOSS开发者_如何学编程 6.
I want to know how and where to enable the "assertion", so I can put assertions in my code, and there be the Assertion Errors while developing and testing.
I want to know if I have to do some configuration in Jboss, or some other place.
I have not tried , but googled it https://docs.jboss.org/author/display/ARQ/Enabling+assertions
Also look at this worked me for Netbeans 7.1 https://stackoverflow.com/a/18046315/2194456
And in jboss 7 , if you want to start in cmd line.
Go to bin folder of Jboss , then in standalone.conf file add
JAVA_OPTS="$JAVA_OPTS -enableassertions"
Not sure about JBoss, but if it has a place to put JRE arguments, you're looking for
-enableassertions
and -disableassertions
Or you can use these on the command line
Check out http://download.oracle.com/javase/1.4.2/docs/guide/lang/assert.html
精彩评论