After adding JDK executables to path it is working fine.
On Windows, click Start > Control Panel > System and Security > System > Advanced
system settings. Click Environment Variables and find the PATH variable in System variables.
Add the location of the bin folder of the JDK installation path to the end of your path value.
Your path might look something like:
%SystemRoot%\system32;%SystemRoot%;C:\Program
Files\Java\jdk1.7.0_15\bin. Click Ok to apply the changes.
Once path is set, run below mentioned command to generate partner wsdl jar file-
java -classpath
D:\SFDC\WSC\force-wsc-37.0.3.jar;D:\SFDC\WSC\ST4-4.0.8.jar;D:\SFDC\WSC\antlr-runtime-3.5.2.jar
com.sforce.ws.tools.wsdlc D:\SFDC_videos\WSC\WSDL\partner.wsdl
.\partner.jar
com.sforce.ws.tools.wsdlc
is in that JAR.