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
  • 37,241
  • 25
  • 195
  • 267
Harbir
  • 453
  • 1
  • 7
  • 24

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,882
  • 5
  • 28
  • 52
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
  • 13,133
  • 2
  • 31
  • 52