本文介绍了在Cygwin中使用sbt,运行“〜run”的play2,不能发送Ctrl-D给它的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我在cygwin终端使用sbt。请运行〜run,如何发送Ctrl + D。

When I use sbt in cygwin terminal. run the "~run", how to send Ctrl + D.

#! /usr/bin/env sh

if [ -z "${JPDA_PORT}" ]; then
  DEBUG_PARAM=""
else
  DEBUG_PARAM="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${JPDA_PORT}"
fi

dir=`dirname $0`
SBT_LAUNCH_JAR=sbt-launch-0.11.2.jar
if [ `uname -o` == "Cygwin" ]
then
  SBT_LAUNCH_JAR_PATH=$(cygpath -w -a $dir/$SBT_LAUNCH_JAR)
  JLINE_TERMINAL=-Djline.terminal=jline.UnixTerminal
else
  SBT_LAUNCH_JAR_PATH=$dir/$SBT_LAUNCH_JAR
fi

JAVA_ARGS="-Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M $JLINE_TERMINAL -Dfile.encoding=UTF8"

java ${DEBUG_PARAM} ${JAVA_ARGS} -jar $SBT_LAUNCH_JAR_PATH "$@"






cygwin环境




cygwin environment

CYGWIN=nodosfilewarning,tty


推荐答案

#! /usr/bin/env sh

if [ -z "${JPDA_PORT}" ]; then
  DEBUG_PARAM=""
else
  DEBUG_PARAM="-Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${JPDA_PORT}"
fi

dir=`dirname $0`
SBT_LAUNCH_JAR=sbt-launch-0.11.2.jar
JAVA_ARGS="-Xms512M -Xmx1024M -Xss1M -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=384M -Dfile.encoding=UTF8"

if [ `uname -o` == "Cygwin" ]
then
  SBT_LAUNCH_JAR_PATH=$(cygpath -w -a $dir/$SBT_LAUNCH_JAR)
  JLINE_TERMINAL=-Djline.terminal=jline.UnixTerminal
  stty -icanon min 1 -echo > /dev/null 2>&1
  java ${DEBUG_PARAM} ${JAVA_ARGS} $JLINE_TERMINAL -jar $SBT_LAUNCH_JAR_PATH "$@"
  stty icanon echo > /dev/null 2>&1
else
  SBT_LAUNCH_JAR_PATH=$dir/$SBT_LAUNCH_JAR
  java ${DEBUG_PARAM} ${JAVA_ARGS} -jar $SBT_LAUNCH_JAR_PATH "$@"
fi

这篇关于在Cygwin中使用sbt,运行“〜run”的play2,不能发送Ctrl-D给它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 18:04