You need to sign in to do that
Don't have an account?

Error could not find or load main class com.sforce.ws.tools.wsdl
After running
java -classpath wsc-22.jar com.sforce.ws.tools.wsdlc enterprise.wsdl enterprise.jar
I get the error:
Error could not find or load main class com.sforce.ws.tools.wsdl
I downloaded wsc-22.jar and put it in my classpath what am I missing?
I figured it out. I removed -classpath wsc-22.jar and it worked correctly.
All Answers
I figured it out. I removed -classpath wsc-22.jar and it worked correctly.
Hi there,
I am looking for someone who can help me out on web services and integrations. I have good experience in apex coding, and now I want to gain knowledge on web services and different ways to connect with outside the salesforce platform database. Can you please provide some information on these areas?
I would like to know about
Please do send something it is very important for me.
Thanks,
Jenni!
I have a different and more general solution. The -classpath should be followed by a path. So this works for me:
java -classpath ./wsc-23.jar etc.....
The ./ turns it into a path to the class file.
Just removing "-classpath wsc-23.jar" did not work for me - it couldn't find main in com.sforce.ws.tools.
I know this is a late reply but try this
Copy wsc-23.jar and your wsdl to C drive without making any folder.
open cmd and run this command
java -classpath c:\wsc-23.jar com.sforce.ws.tools.wsdlc C:\enterprise.wsdl C:\enterprise.jar
The issue you are facing is due to the conflict between your JDK version and JRE version. Try to use same JDK and JRE version. for eg : 1.7.1 for both JDK and JRE and you should be good to go..
-DcompileTarget=1.8
Suppose you have 2 version JDK, you can let command know which version to use.
Please provide some suggestions..
.
The mistake was in the wcs jar name.
Error: Could not find or load main class com.sforce.ws.tools.wsdlc
Could anyone please help.