我在c:\program files(x86)\jenkins
中安装了jenkins,并试图与helloworld java
文件集成。但是当我第一次尝试从詹金斯本身构建时,它失败了。
我通过以下链接:https://www.youtube.com/watch?v=bGqS0f4Utn4
当我在admin cmd提示符下编译Java文件时,其编译成功。但在jenkins console
内失败。
我创建了一个C:\ workspace文件夹,并将Java文件保存在那里。
怎么了?为什么控制台输出中的路径错误?
am在控制台输出中出现以下错误:
`Console Output
Started by user user1
Running as SYSTEM
[EnvInject] - Loading node environment variables.
Building in workspace C:\Program Files (x86)\Jenkins\workspace\
HelloWorld
[HelloWorld] $ cmd /c call C:\Windows\TEMP\jenkins6223662388306682118.bat
C:\Program Files (x86)\Jenkins\workspace\HelloWorld>cd C:\Workspace
C:\Workspace>javac Hello.java
'javac' is not recognized as an internal or external command,
operable program or batch file.
C:\Workspace>java Hello
'java' is not recognized as an internal or external command,
operable program or batch file.
C:\Workspace>exit 9009
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE
答案 0 :(得分:0)