문제

I want to start a batch-script in my eclipse. (Instructions here: How to run a batch script (.bat file) from eclipse)

In my batch file i need some commands like pear or phing.

I put the path to these commands into my environment variable called PATH. (Works fine with cmd manually)

After starting the script, I'm getting this error:

'pear' is not recognized as an internal or external command,
operable program or batch file.

If I type pear by hand, it doesn't work either.

도움이 되었습니까?

해결책

You need to restart Eclipse after changing the system environment; environment variable changes requires any process that is already running to be restarted in order for that application to pick up the changes.

Another option might be to put the full path to those commands in the .bat file so that it doesn't rely on the system environment in order to work properly.

Tip: Make sure to close and start eclipse afresh for PATH variable changes to take effect. Using the Restart option in File menu may not help here.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top