[jboss-osgi-issues] [JBoss JIRA] Created: (JBOSGI-492) Invalid run.sh when cygwin on windows

Thomas Diesler (JIRA) jira-events at lists.jboss.org
Tue Aug 16 06:13:17 EDT 2011


Invalid run.sh when cygwin on windows
-------------------------------------

                 Key: JBOSGI-492
                 URL: https://issues.jboss.org/browse/JBOSGI-492
             Project: JBoss OSGi
          Issue Type: Bug
      Security Level: Public (Everyone can see)
            Reporter: Thomas Diesler
            Assignee: David Bosschaert


The problem is in these lines of run.sh:

{code}
# Setup JBoss specific properties
JAVA_OPTS="-Dprogram.name=$PROGNAME -Dosgi.home=$OSGI_HOME $JAVA_OPTS"
 

# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
    OSGI_HOME=`cygpath --path --windows "$OSGI_HOME"`
    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
    OSGI_CLASSPATH=`cygpath --path --windows "$OSGI_CLASSPATH"`
fi
{code}

The JAVA_OPTS assignment needs to be moved after the cygwin conversions:

{code}
# For Cygwin, switch paths to Windows format before running java
if $cygwin; then
    OSGI_HOME=`cygpath --path --windows "$OSGI_HOME"`
    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
    OSGI_CLASSPATH=`cygpath --path --windows "$OSGI_CLASSPATH"`
fi

# Setup JBoss specific properties
JAVA_OPTS="-Dprogram.name=$PROGNAME -Dosgi.home=$OSGI_HOME $JAVA_OPTS"
{code}

This is because OSGI_HOME needs to be put into widows format before being added to JAVA_OPTS.

Also, I needed to change these echos to /bin/echo -E so that the backslashes in the windows file names are not eaten:
 
{code}
/bin/echo -E "  OSGI_HOME: $OSGI_HOME"
/bin/echo -E "  JAVA: $JAVA"
/bin/echo -E "  JAVA_OPTS: $JAVA_OPTS"
{code}

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-osgi-issues mailing list