why the error occurs when i am starting the jboss server 6.0 ? 'findstr' is not recognized as an internal or external command, operable program or batch file.
It looks like your PATH environment variable hasn't been set up correctly. Does this link help?
http://community.jboss.org/wiki/FindstrCommandNotFound
EDIT: are you sure that the JBoss startup batch script (usually in %JBOSS_HOME%\bin\run.bat
) is picking up the PATH correctly? It might be running as a different user with a different PATH. Edit this script and add the line echo %PATH%
before the first line that contains findstr
. What output does this give you?
The only other place findstr
is used (in jboss-6.0.0.20100721-M4 anyway) is in the service.bat
script in the same folder as run.bat
. Again, you could try putting echo %PATH%
before the line in this script that uses findstr
if the previous step didn't help you.
EDIT 2: according to your comments, the echo %PATH%
line I asked you to add gave the following output:
E:\jdk1.6\bin;E:\apache-ant-1.7.0\bin;E:\jboss-6.0\bin\run.bat
Clearly this doesn't contain C:\WINDOWS\system32
, so JBoss definitely won't be able to find findstr
. But I don't understand why the PATH is ending up like this. How are you starting JBoss - as a service or by running run.bat
? Is JBoss being run under some user account which has been set up with a very restricted PATH? Do you have some other script which is manipulating the PATH before JBoss starts? Also, which version of Windows are you using?
Also, it's not immediately clear to me from your three comments
- I'm already checked that the findstr application is already in that path C:\WINDOWS\system32\
- E:\jboss-6.0\bin\run.bat
- Am also set that in the system variables in Environmental Variables
whether C:\WINDOWS\system32
is in the PATH in Control Panel > System > Environment Variables. Is C:\WINDOWS\system32
in the PATH in the System Variables section within the Environment Variables dialog?
This doesn't seem to be an issue with JBoss. This seems to be more of an issue with the environment within which you are running it. I can quite imagine a lot of other programs would be unhappy with being run in a similar environment.