2 Replies Latest reply on Dec 10, 2014 3:39 PM by Fabio De Carli

    need to add environmental varaible in 7.1.1

    KALPANA dokala Newbie

      Hi ,


      I want to add additional environment variable in jboss application server configuration and java access code.

      Please let me know the steps for the same .  Ex: environment=dev


      I added -Denvironment=dev in standalone.conf file and used  System.getProperty("environment") in java code.


      But nothing is displaying.


      if [ "x$JAVA_OPTS" = "x" ]; then

         JAVA_OPTS="-Xms64m -Xmx512m -XX:MaxPermSize=256m -Djava.net.preferIPv4Stack=true -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"

         JAVA_OPTS="$JAVA_OPTS -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true  -Denvironment=dev"

         JAVA_OPTS="$JAVA_OPTS -Djboss.server.default.config=standalone.xml"


         echo "JAVA_OPTS already set in environment; overriding default settings with values: $JAVA_OPTS"