setup for java environment and eclipse working fine
Navigate to http://mvnrepository.com/artifact/com.force.api/force-wsc in your browser and download the WSC pre-built .jar file that matches the API version of Salesforce you’re using.
WSC uses the Rhino JavaScript framework, so if you don’t have this installed, navigate to https://developer.mozilla.org/en-US/docs/Rhino/Download_Rhino and download the latest .zip file. Un-archive the .zip file and move the folder to a location you’ll remember.
Generating Java Stub Files (WSDL-based APIs)
develop-->api-->downloaded wsdl file.
Trying in command prompt:
But getting in an error
C:>java - classpath F:\11\pathToJAR\wsc-23.jar com.sforce.ws.tools.wsdlc F:\11\pathToWsdl\enterprise.wsdl? F:\11\enterprise_stub.jar Exception in thread "main" java.lang.NoClassDefFoundError: û Caused by: java.lang.ClassNotFoundException: û at java.net.URLClassLoader$1.run(Unknown Source) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source) at java.lang.ClassLoader.loadClass(Unknown Source) Could not find the main class: GÇô. Program will exit.