Reputation: 6637
The following FINDSTR example gives me error.
"%JAVA%" -version 2>&1 | findstr /I hotspot > nul
Error: 'findstr' is not recognized as an internal or external command, operable program or batch file.
Why?
Upvotes: 2
Views: 1325
Reputation: 79
Right Click On My Computer - Advanced - Environment Variables - System Variables - Select Path variable - append the below
C:\WINDOWS\system32
Upvotes: 0
Reputation: 882626
Okay, you need to make sure that findstr.exe
actually exists (in c:\windows\system32
by default).
If not (unlikely), that's your problem.
If it does exist, make sure that the directory it exists in is in your path. Executing path
from a command window will show this.
Try to execute:
echo hello | findstr /I hello
and see what happens. If that works and the Java one doesn't, it's possible that Java itself may be modifying the path in a way that makes findstr
disappear.
Upvotes: 4