1 Reply Latest reply on May 7, 2010 8:19 AM by Manik Surtani

    Updated runGuiDemo.sh for cygwin

    Supin Ko Newbie

      Hey guys,

       

      I had to tweak runGuiDemo.sh to run on cygwin. Here it is in case any one else needs it:

      #!/bin/bash

       

      DIRNAME=`dirname $0`

       

      # Detect cygwin
      cygwin=false
      case "`uname`" in
      CYGWIN*) cygwin=true;;
      esac

       

      # Setup ISPN_HOME
      if [ "x$ISPN_HOME" = "x" ]; then
          # get the full path (without any relative bits)
          ISPN_HOME=`cd $DIRNAME/..; pwd`
      fi
      export ISPN_HOME

       

      CP=${CP}:${ISPN_HOME}/etc

       

      for i in ${ISPN_HOME}/*.jar ; do
         CP=${CP}:${i}
      done

       

      for i in ${ISPN_HOME}/lib/*.jar ; do
         CP=${CP}:${i}
      done

       

      for i in ${ISPN_HOME}/modules/gui/*.jar ; do
         CP=${CP}:${i}
      done

       

      for i in ${ISPN_HOME}/modules/gui/lib/*.jar ; do
         CP=${CP}:${i}
      done

       

      if $cygwin; then
         # Turn paths into Windows style for cygwin
         CP=`cygpath -wp ${CP}`
         LOG4J_CONFIG=`cygpath -w ${ISPN_HOME}/etc/log4j.xml`
      else
         LOG4J_CONFIG=${ISPN_HOME}/etc/log4j.xml
      fi

       

      JVM_PARAMS="${JVM_PARAMS} -Dbind.address=127.0.0.1 -Djava.net.preferIPv4Stack=true -Dlog4j.configuration=file:${LOG4J_CONFIG}"

       

      # Sample JPDA settings for remote socket debuging
      JVM_PARAMS="$JVM_PARAMS -Xrunjdwp:transport=dt_socket,address=8686,server=y,suspend=n"

       

      java -cp ${CP} ${JVM_PARAMS} org.infinispan.demo.InfinispanDemo &

       

       

      Thanks,

      Supin