tags:

views:

48

answers:

1

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.

+1  A: 

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.

Pourquoi Litytestdata
I'm already checked that the findstr application is already in that pathC:\WINDOWS\system32\
AdalArasan
E:\jboss-6.0\bin\run.bat
AdalArasan
Am also set that in the system variables in Environmental Variables.
AdalArasan
But there is no change. Am using your echo %path% ..the result is
AdalArasan
E:\jdk1.6\bin;E:\apache-ant-1.7.0\bin;E:\jboss-6.0\bin\run.bat
AdalArasan
For ur patience ,i really thank you first.1.AM running the jboss 1.6.0 through netbeans6.8.2.i'm using the user account for windows only.3.version : windows 7.0In My comments1.C:\WINDOWS\system32 in the PATH in the System Variables section within the Environment Variables.Am using the netbeans 6.8,the error occurs in this wayI have an another option to start the jboss through start the run.bat in bin folder.
AdalArasan
@AdalArasan: I have to admit I haven't used NetBeans much. Nonetheless, I downloaded the latest version (6.9.1) and tried to add a JBoss 6 server to it using Tools > Servers, but was unable to. NetBeans apparently doesn't support JBoss 6 (http://netbeans.org/community/releases/69/relnotes.html), only JBoss versions 4 and 5. How are you starting JBoss 6 through NetBeans?
Pourquoi Litytestdata