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

后端 未结 7 918
春和景丽
春和景丽 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:10

    I also ran into the same problem and found my solution. It might help you too.

    1. Set the PATH variable. I don't know if this step is required or not, but i just added the path to java.exe in TEMP variable.
    2. At command prompt changed the current directory to java.exe parent directory.
    3. Now ran to command which i required. If some file is been referenced in the command then i put the complete path.

    Hope it helps you.

提交回复
热议问题