Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-3796

run.sh script fails when JAVA_OPTS has spaces

    XMLWordPrintable

Details

    • Feature Request
    • Resolution: Done
    • Major
    • EAP 5.0.0, 4.2.0.GA_CP08, 4.3.0.GA_CP07
    • System
    • None
    • Linux

    • Compatibility/Configuration

    Description

      In its present form, the run.sh cannot handle JAVA_OPTS that require parameters with spaces,

      The script should be changed to read
      ---------------
      if [ "x$LAUNCH_JBOSS_IN_BACKGROUND" = "x" ]; then

      1. Execute the JVM in the foreground
        eval "$JAVA" $JAVA_OPTS \
        -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
        -classpath "$JBOSS_CLASSPATH" \
        org.jboss.Main "$@"
        JBOSS_STATUS=$?
        else
      2. Execute the JVM in the background
        eval "$JAVA" $JAVA_OPTS \
        -Djava.endorsed.dirs="$JBOSS_ENDORSED_DIRS" \
        -classpath "$JBOSS_CLASSPATH" \
        org.jboss.Main "$@" &
        JBOSS_PID=$!
        ---------------
        (note the addition of eval)

      With the change in place, it should be possible to define something like -XX:OnError=gdb - %p, in JAVA_OPTS
      e.g
      export JAVA_OPTS="$JAVA_OPTS \"-XX:OnError=gdb - %p\""

      Without those changes, such JAVA_OPTS parameters have to be hard-coded in run.sh which is not desirable.

      Attachments

        Issue Links

          Activity

            People

              rhn-engineering-mturk Mladen Turk
              rhn-support-lakagwu Lami Akagwu
              Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: