1

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.

1
  • 1
    I would suggest using an absolute path, if at all possible May 17, 2010 at 14:52

1 Answer 1

1

Why not just provide the full path?

e.g.:

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

You must log in to answer this question.