运行短批处理时,我收到“系统找不到指定的路径”错误消息,该批处理正确地呼应LAW_JAVA_HOME变量并设置新变量。即使当我从命令行CMD运行此命令并包含变量时,它也会返回相同的错误。
@ ECHO OFF
if not defined LAW_JAVA_BIN (
set LAW_JAVA_BIN=%LAW_JAVA_HOME%\bin
)
%LAW_JAVA_BIN%\java.exe -Djava.net.preferIPv4Stack=true -jar
%LAENVDIR%\java\bin\managegrid.jar %*
与此路径相关的路径问题应为PF86-C:\ Progra〜1 \ Java \ jdk1.6.0_45 \ bin
答案 0 :(得分:0)
我的评论为答案:
@Echo Off
If Not Defined LAW_JAVA_HOME Exit /B
If Not Defined LAENVDIR Exit /B
If Not Defined LAW_JAVA_BIN Set "LAW_JAVA_BIN=%LAW_JAVA_HOME%\bin"
"%LAW_JAVA_BIN%\java.exe" -Djava.net.preferIPv4Stack=true -jar "%LAENVDIR%\java\bin\managegrid.jar" %*