1

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.

Cœur
  • 34,719
  • 24
  • 185
  • 251
Harbir
  • 443
  • 1
  • 7
  • 22

2 Answers2

1

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"

Community
  • 1
  • 1
LMK
  • 2,662
  • 4
  • 27
  • 50
0

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

dfb
  • 12,995
  • 1
  • 29
  • 52