For example in this case I have extracted the workbench schema ps-ce-22.214.171.124-386 in my desktop. So i run the command prompt in Windows by click Start>>Search>>Type CMD and press ENTER on the keyboard. Once it is in command prompt usually the position of the folder is something like C:\Users\PC USER 1 (Note: for different computer might be different directory).
Since we know the directory location of the workbench is in desktop and the name is psw-ce-126.96.36.199-386\schema-workbench so i just type the following command to change the directory location to that file.
cd psw-ce-188.8.131.52-386\schema-workbench and press "ENTER" on the keyboard. Now the directory will change to C:\Users\PC USER 1\Desktop\psw-ce-184.108.40.206-386\schema-workbench>workbench in the command prompt.
In this directory C:\Users\PC USER 1\Desktop\psw-ce-220.127.116.11-386\schema-workbench>workbench. You can run the "workbench.bat" file by typing workbench or workbench.bat and the error message below appear.
C:\Users\PC USER 1\Desktop\psw-ce-18.104.22.168-386\schema-workbench>workbench
WARNING: Using java from path
'"java"' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\PC USER 1\Desktop\psw-ce-22.214.171.124-386\schema-workbench>
How to solve this problem
1. Download Java Environment from Oracle Downloads make sure to download the correct version i am using Windows 10 (32 bits) so download the Windows X86 version
2. Once download and install the Java - In this case I've installed in C:\Program Files directory
3. Once installed go to the Pentaho psw-ce-126.96.36.199-386\schema-workbench folder and edit the workbench.bat using notepad++
4. Look for this section
for %%i in ("plugins\*.jar") do call cpappend %%i
"%_PENTAHO_JAVA%" -Xms1024m -Xmx2048m -cp "%CP%" -Dlog4j.configuration=file:///%ROOT%\.schemaWorkbench\log4j.xml mondrian.gui.Workbench
rem End workbench.bat
5. Change the java.exe with the installed java including its directory location so that it reads like so set PENTAHO_JAVA=C:\Program Files\Java\jre1.8.0_73\bin\java.exe
6. Save the file and run the workbench.bat again - it should be working