'How to Add Java VM Arguments in JBoss EAP 6.1.1 Management Console

Does anyone know how to add Java VM arguments for a web application (*.war file) via the JBoss EAP 6.1.1 Management Console?

For example, I want to specify the location of a truststore at C:\truststore\truststore.jks, which is used in my web application for SSL. The java options I would normally run with a Java application would be:

-Djavax.net.ssl.trustStore=c:/truststore/truststore.jks

Is there a specific field that I can enter this into in the console for web apps running in JBoss EAP? Or a setting somewhere in standalone.xml (or some other configuration file, which in theory should get picked up and displayed in the console like all the other settings)?

Thanks in advance.



Solution 1:[1]

Under the Profiles tab in the console, there is a "System Properties" section where you can add key/value pairs. Click the "Add" button and enter in your VM arguments as a key/value pair, save them, then restart the server for your new properties to take effect.

For example:

key:   javax.net.ssl.trustStore 
value: C:\mydirectory\keystore\cacerts 

You can also add JNDI properties and Maven commands in your pom.xml to do the same thing.

Solution 2:[2]

Add below line in jboss-server-folder/bin/standalone.bat

set "JAVA_OPTS=-Djavax.net.ssl.trustStore=c:/truststore/truststore.jks %JAVA_OPTS%"

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Fuzzy Analysis
Solution 2 pradip garala