我在Windows环境中设置了OpenSSH,并且想要从Linux环境调用ANT脚本。但我发现了以下错误:无法使用SSHEXEC在Linux的窗口中调用远程脚本
$ ant -f invoke.xml
Buildfile: /home/inysi/jpegu/cdt/tmp/invoke.xml
run:
[sshexec] Connecting to ******
[sshexec] cmd : ant -f build.xml
[sshexec] uname: not found
[sshexec] basename: not found
[sshexec] dirname: not found
[sshexec] Error: JAVA_HOME is not defined correctly.
[sshexec] We cannot execute java
[sshexec] which: not found
BUILD SUCCESSFUL
Total time: 2 seconds
但是,我可以调用使用SSHEXEC从窗户在Linux环境下的远程Ant脚本。
您能否让我知道,可能是什么问题。 JAVA_HOME在Windows环境变量中设置。在Windows环境中设置JAVA_HOME的位置。在Windows中是否有类似于.bash_profile的内容?所以ANT过程可以把它拿起来。