- :~ $ cat webapp/scptolocal/scptolocal
- #!/bin/sh
- # -------------------------------------------------------------------------
- # Pandion Launcher
- # args:
- # -b,--bind <[aet[@ip]:]port> e.g.:'LIFECCP:107'
- # --directory e.g.:'./dicom'
- # -------------------------------------------------------------------------
- MAIN_CLASS=com.lifeccp.box.store.DicomReceiver
- MAIN_JAR=pandion-1.0.5.release.jar
- DIRNAME="$(dirname "$0")"
- # OS specific support (must be 'true' or 'false').
- cygwin=false;
- case"$(uname)" in
- CYGWIN*)
- cygwin=true
- ;;
- esac
- # For Cygwin, ensure paths are in UNIX format before anything is touched
- if $cygwin ; then
- [ -n "$WORK_HOME" ] &&
- WORK_HOME=$(cygpath --unix "$WORK_HOME")
- [ -n "$JAVA_HOME" ] &&
- JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
- fi
- # Setup WORK_HOME
- if[ "x$WORK_HOME" = "x" ]; then
- WORK_HOME=$(cd "$DIRNAME"; pwd)
- fi
- # Setup the JVM
- JAVA="java"
- # if[ "x$JAVA_HOME" != "x" ]; then
- # JAVA=$JAVA_HOME/bin/java
- # else
- # JAVA="java"
- # fi
- # Setup the classpath
- CP="$WORK_HOME/$MAIN_JAR"
- # Execute the JVM
- exec "$JAVA" -cp "$CP" $MAIN_CLASS "$@"
来源: http://www.bubuko.com/infodetail-1976945.html