“java.exe” is not recognized as an internal or external command, operable program or batch file

后端 未结 7 941
春和景丽
春和景丽 2021-01-16 04:52

I am writing an application that creates a Java portlet by the ant batch file with the cmd.exe using a Process object in C#.

When I pass the \"Create\" command to th

7条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-16 05:16

    I don't know if this will help anyone else that is viewing this post but when i had this problem it was because I was running a x64 machine and the java.exe was installed to the ProgramFiles(x86) folder. I simply added the path to the exe to the 'PATH' environment variable and then it fired up just fine.

    Hope this helps someone.

提交回复
热议问题