I'd like Java assertions to be enabled for Java EE code which is running on Payara 4.1.1.172 and is deployed from within NetBeans 8.2. I tried to specify exec.args=-ea
in the NetBeans Action "Debug project", but that doesn't help. https://stackoverflow.com/a/14710564/1797006 suggests to configure the JVM options in the server settings, but those aren't available because of NetBeans 8.2 or the Glassfish server layout.
相关问题
- Delete Messages from a Topic in Apache Kafka
- Jackson Deserialization not calling deserialize on
- How to maintain order of key-value in DataFrame sa
- StackExchange API - Deserialize Date in JSON Respo
- Difference between Types.INTEGER and Types.NULL in
You need to modify the settings in the Payara Server configuration, because Netbeans only deploys an application to an already running server.
You can do this from the Admin Console, which you can open from Netbeans - right click on the Payara Server in the Services window and select View Domain Admin Console.
Then, the Admin console should open in a browser (if it doesn't just point your browser to http://localhost:4848). Go to Configuration -> server-config -> JVM settings -> JVM options tab. Then press the button "Add JVM Option" and specify
-ea
as its valueYou need to restart the server afterwards.