Adding System Properties to the JBoss Server – Windows

  1. If the server is running, it must be stopped. Changes to a server that is running will not be dynamically loaded.
  2. In a Windows Explorer window, enter the server bin location. For example: C:\Program Files\JBoss\jboss-eap-7.4\bin.
  3. In the bin folder locate the standalone.bat file. Make a backup copy for safety. If the file you are editing gets corrupted, you can restore the original file.
  4. Open the standalone.bat file and right click to Edit. Scroll towards the end of the file.

  5. Locate the DOS if instruction that looks similar to the one in the above screenshot. Your exact file may have slight variations.
  6. You will need to insert the following system property declarations:
    • -DINSBRIDGE_APP_DIR=“C:\Insbridge\Config”

      If you copy, please verify valid characters have been entered.

      In this declaration, add a system property for the application directory location to the Java Virtual Machine using the “-D” parameter, then specify “INSBRIDGE_APP_DIR” as the name of the new variable.

      You must also specify the path where the configuration file will be located. i.e. “C:\Insbridge\Config”. Where C:\Insbridge\config is the folder you created earlier.

    • -DINSBRIDGE_INSTANCE_APP_DIR="C:\Insbridge\Config\Instance". If you copy, please verify valid characters have been entered.

    In this declaration, add a system property for the instance application directory to the Java Virtual Machine using the “-D” parameter, then specify “INSBRIDGE_INSTANCE_APP_DIR” as the name of the new variable.

    You must also specify the path where the configuration file will be located. i.e. “C:\Insbridge\Config\Instance”. Where C:\Insbridge\config\Instance is the folder you created earlier.

    Note: If JBoss does not enter running mode, please check the start dialogue. If your system property is not recognized, please verify that valid characters have been entered.

     

    For Example:

    rem Setup JBoss specific properties

    set JAVA_OPTS=-Dprogram.name=%PROGNAME% %JAVA_OPTS% -DINSBRIDGE_APP_DIR="C:\Insbridge\config" -DINSBRIDGE_INSTANCE_APP_DIR="C:\Insbridge\config\Instance"

  7. Save your changes.
  8. The variable will be added to the Server the next time it is started.