Friday, April 1, 2016

Setting run time java properties for JBOSS launch configuration



Follow the below given steps to set the runtime properties in eclipse:

1- Go to “Servers” perspective.

2- Open the JBOSS server configuration. Right click on JBOSS Runtime (e.g. JBOSS AS 5.0) and then click “Open”


 3-      It will open JBOSS Configuration as given below.






4- Click on “Open Launch Configuration” (as highlighted above)
5- It will open “Edit Launch Configuration” window as shown below.


6- In the “Program Arguments” section you can add more parameters. Here I am adding
-Denv=local”using the standard jvm -Dkey=value option. See screen given below.







7- Click on “Apply” and then click on “OK” to save the configuration.

Follow the below given steps to set the runtime properties via command line:

1-      Got to JBOSS_HOME/bin
2-      You can find “run.bat” or “run.sh” for JBOSS AS 5.0 and “standalone.bat” or “standalone.sh” for JBOSS AS 7
3-      You can run JBOSS by passing command line parameter as given below.


For windows:

“run.bat  -Denv=local”

Or

“standalone.bat  -Denv=local”

For Linux:

“standalone.sh -Denv=local”

Or

“standalone.sh -Denv=local”

4-      Alternatively you can also set the java parameters in ‘JBOSS_HOME/bin/run.conf’ JAVA_OPTS value. See example below:

JAVA_OPTS="-Denv=local -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"

JBOSS 7 onwards, instead of passing the parameters directly, you can put them into a properties file, and pass the properties file to the script, as in the two examples below.

$JBOSS_HOME/bin/standalone.sh --properties=/some/location/jboss.properties
Or
$JBOSS_HOME/bin/standalone.sh -P=/some/location/jboss.properties

The properties file is a standard Java property file containing key=value pairs.

For more details visit:



No comments:

Post a Comment

Thanks for your comments/Suggestions.