我正在运行批处理文件并收到错误“输入行太长。命令的语法错误。”我希望你能帮忙解决这个错误。
更多细节:
我正在处理SymmetricDB的教程:http://www.symmetricds.org/doc/2.5/pdf/user-guide.pdf
我在第2.2节“创建和填充数据库”中,在第2步,我必须运行命令“sym”。详细信息在pdf中。
我拥有批处理文件的所有 no 经验,并且只有很少的命令行经验。搜索过后,似乎完整的目录路径被插入到批处理文件中的命令中,导致命令比Windows允许的更长,但我不是100%清楚我需要做什么来解决它。
供参考,以下是sym批处理文件的内容(如果有帮助,我可以复制其他内容)。还有一个普通的sym文件,复制在底部。
非常感谢, 乔迪
@REM license agreements. See the NOTICE file distributed
@REM with this work for additional information regarding
@REM copyright ownership. JumpMind Inc licenses this file
@REM to you under the GNU General Public License, version 3.0 (GPLv3)
@REM (the "License"); you may not use this file except in compliance
@REM with the License.
@REM
@REM You should have received a copy of the GNU General Public License,
@REM version 3.0 (GPLv3) along with this library; if not, see
@REM <http://www.gnu.org/licenses/>.
@REM
@REM Unless required by applicable law or agreed to in writing,
@REM software distributed under the License is distributed on an
@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@REM KIND, either express or implied. See the License for the
@REM specific language governing permissions and limitations
@REM under the License.
@REM
@echo off
set PRGDIR=%~dp0
set HOMEDIR=%PRGDIR%..
set CONFDIR=%HOMEDIR%\conf
set CLASSPATH=%HOMEDIR%\patches
for %%i in ("%HOMEDIR%\lib\*.jar") do call "%PRGDIR%cpappend.bat" %%i
for %%i in ("%HOMEDIR%\web\WEB-INF\lib\*.jar") do call "%PRGDIR%cpappend.bat" %%i
rem echo CLASSPATH=%CLASSPATH%
java -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=../tmp -Dfile.encoding=utf-8 -Duser.language=en -Djava.io.tmpdir=../tmp -Dorg.eclipse.jetty.server.Request.maxFormContentSize=800000 -Dorg.eclipse.jetty.server.Request.maxFormKeys=100000 -Dsym.keystore.file="%HOMEDIR%\security\keystore" -Djavax.net.ssl.trustStore="%HOMEDIR%\security\cacerts" -Dlog4j.configuration="file:%CONFDIR%\log4j.xml" -Dsun.net.client.defaultReadTimeout=1800000 -Dsun.net.client.defaultConnectTimeout=1800000 org.jumpmind.symmetric.SymmetricLauncher %1 %2 %3 %4 %5 %6 %7 %8 %9
Plain .sym文件:
#!/bin/sh
#
# Run commandline support through SymmetricLauncher
#
PRGDIR=`dirname "$0"`
if [ "$PRGDIR" = "" ]
then
PRGDIR=`echo $0 | sed 's/\/sym//g'`
fi
if [ "$PRGDIR" = "" ]
then
PRGDIR="."
fi
LIBDIR=$PRGDIR/../lib
WEBLIBDIR=$PRGDIR/../web/WEB-INF/lib
LOG4JXML="file:$PRGDIR/../conf/log4j.xml"
RUNJAVA=java
if [ -n "log4j.xml" -a -f "log4j.xml" ]
then
LOG4JXML="file:$PRGDIR/log4j.xml"
fi
if [ -x "$JAVA_HOME/bin/java" ]
then
RUNJAVA="$JAVA_HOME/bin/java"
fi
CLASSPATH=../patches
SEP=:
if uname | grep -i cygwin > /dev/null
then
SEP=";"
fi
for jar in $LIBDIR/*
do
CLASSPATH=${CLASSPATH}${SEP}${jar}
done
for jar in $WEBLIBDIR/*
do
CLASSPATH=${CLASSPATH}${SEP}${jar}
done
#echo $CLASSPATH
exec "$RUNJAVA" -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=../tmp -Dfile.encoding=utf-8 -Duser.language=en -Djava.io.tmpdir=../tmp -Dorg.eclipse.jetty.server.Request.maxFormContentSize=800000 -Dorg.eclipse.jetty.server.Request.maxFormKeys=100000 -Dsym.keystore.file="$PRGDIR/../security/keystore" -Djavax.net.ssl.trustStore="$PRGDIR/../security/cacerts" -Dsun.net.client.defaultReadTimeout=1800000 -Dsun.net.client.defaultConnectTimeout=1800000 -Dlog4j.configuration=$LOG4JXML -cp $CLASSPATH org.jumpmind.symmetric.SymmetricLauncher "$@"
答案 0 :(得分:0)
我所知道的唯一一个与咖啡因有关的java - 尽管如此,你可以尝试打破JAVA
行
java whatever whatever whatever^
and so on war and peace^
are you sure it is not COBOL %*
插入符号( ^ )是cmd的行继续符,%*
表示“所有过程的参数”