gpt4 book ai didi

java - Windows命令脚本无法识别Java程序的CD参数

转载 作者:行者123 更新时间:2023-12-02 08:12:10 25 4
gpt4 key购买 nike

我正在尝试从名为 converter.cmd 的脚本运行 Java 程序,但出现了问题。

    P:\LatitudeConsulting\LatConConverter-1.8.2>dir
Volume in drive P has no label.
Volume Serial Number is 1074-4BBE

Directory of P:\LatitudeConsulting\LatConConverter-1.8.2

08/25/2011 10:32 AM <DIR> .
08/25/2011 10:32 AM <DIR> ..
05/11/2011 09:29 PM 2,349 convert.xsd
02/19/2008 09:28 PM 100 Converter.cmd
05/11/2011 09:29 PM 104,697 Converter.jar
05/11/2011 09:29 PM 74,082 Converter.jar.old
05/19/2011 01:02 PM 1,432 Converter.properties
05/19/2011 04:37 PM 1,432 Converter.properties.modifiedJJA.txt
08/24/2011 04:54 PM 292 FieldList.txt
08/25/2011 10:31 AM <DIR> jre.1.6.0
05/11/2011 09:30 PM 1,747 MimeTypes.properties

这里是converter.cmd的内容:

cd %~dp0%
jre.1.6.0\bin\java -Xmx1024m -cp Converter.jar com.latcon.ExportConvert.Converter %1 %2

这是我在上面的命令提示符下键入转换器时得到的结果:

    P:\LatitudeConsulting\LatConConverter-1.8.2>converter

P:\LatitudeConsulting\LatConConverter-1.8.2>cd P:\LatitudeConsulting\LatConConverter-1.8.2\

P:\LatitudeConsulting\LatConConverter-1.8.2>jre.1.6.0\bin\java -Xmx1024m -cp Converter.jar com.latcon.ExportConvert.Conv
erter
'jre.1.6.0\bin\java' is not recognized as an internal or external command,
operable program or batch file.

P:\LatitudeConsulting\LatConConverter-1.8.2>

编辑---------

    P:\>dir p:\LatitudeConsulting\LatConConverter-1.8.2\jre.1.6.0\bin\java.*
Volume in drive P has no label.
Volume Serial Number is 1074-4BBE

Directory of p:\LatitudeConsulting\LatConConverter-1.8.2\jre.1.6.0\bin

05/11/2011 09:29 PM 126,976 java.dll
1 File(s) 126,976 bytes
0 Dir(s) 16,691,785,728 bytes free

P:\>

看起来不存在 java.exe - 只有 java.dll

最佳答案

尝试 jre.1.6.0\bin\java.exe - 使用扩展名。

关于java - Windows命令脚本无法识别Java程序的CD参数,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7192566/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com