Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I use the PSEXEC to start the java process in local machine. When I run the PSEXEC without any user account it works fine.

c:/>psexec java testclass

But when I run with an user account

c:>psexec -u user -p password java test

It gives me the below error

PsExec could not start java: The system cannot find the file specified

I checked the environemt variable for the the above user and the PATH variable has been properly mapped to the java path. Could any one help me to resolve this issue.

share|improve this question
I would suggest using an absolute path, if at all possible – Matt Simmons May 17 '10 at 14:52

Why not just provide the full path?


psexec -u username -p pw "C:\Program Files\Java\jre6\bin\java.exe" C:\path\test
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.