开发者

Setting up batch file to run on command line, setting up shop

开发者 https://www.devze.com 2023-01-10 02:27 出处:网络
I just installed the into the defaulta location C:\\Program Files and wanted a batch file to start when I start a new cmd in Windows XP.My batch file is:

I just installed the into the defaulta location C:\Program Files and wanted a batch file to start when I start a new cmd in Windows XP. My batch file is:

@echo off
SET TOOLS_HOME=%ProgramFiles%\Java
SET JAVA_HOME=%TOOLS_HOME%\jdk1.6.0_21
SET PATH=%JAVA_HOME%\BIN;%PATH%
SET CLASSPATH=.;

This file开发者_如何学C is in Program Files\Java\jdk1.6.0_21\bin

From there, I created a shortcut for my cmd-line, and I used the /k in target so that looks like:

%SystemRoot%\system32\cmd.exe /k %ProgramFiles%\Java\jdk1.6.0_21\bin\setenv.bat

And my Start in: is %HOMEDRIVE%

When I then start my command prompt, I get 'c:\Program\ is not recognized as an internal or external command, operable program or batch file. Is my batch file correct? Or is my Target/Start in incorrect? Thanks.


Add "" around the param line such as:

%SystemRoot%\system32\cmd.exe /k "%ProgramFiles%\Java\jdk1.6.0_21\bin\setenv.bat"
0

精彩评论

暂无评论...
验证码 换一张
取 消