I want to generate partner.jar.

My path is :-

java -classpath "C:\Program Files\Java\jdk1.7.0_79\lib\wsc-23.jar;C:\Program Files\Java\jdk1.7.0_79\lib\tools.jar"com.sforce.ws.tools.wsdlc partner.wsdl partner.jar

Error: Could not find or load main class partner.wsdl

  • Please add a space before com.sforce.ws.tools.wsdlc . Also, Are you providing fully qualified path for partner WSDL file . Ex: java -classpath " C:\Program Files\Java\jdk1.7.0_79\lib\wsc-23.jar;C:\Program Files\Java\jdk1.7.0_79\lib\tools.jar" com.sforce.ws.tools.wsdlc "C:**<SOMEFOLDER>**/partner.wsdl" "C:**<SOMEFOLDER>**/partner.jar".
    – manjit5190
    Commented Sep 24, 2015 at 11:45

1 Answer 1


There are some basic instructions in Instructions for Java Environments (WSC)

Java environments access the API through Java objects that serve as proxies for their server-side counterparts. Before using the API, you must first generate these objects from your organization’s WSDL file.

Each SOAP client has its own tool for this process. For WSC, use the wsdlc utility.

Before you run wsdlc, you must have the WSC JAR file installed on your system and referenced in your classpath.

The basic syntax for wsdlc is:

java –classpath pathToJAR/wsc-22.jar com.sforce.ws.tools.wsdlc pathToWsdl/WsdlFilename​ pathToOutputJar/OutputJarFilename

This command generates an output jar file based on the specified WSDL file. After the output jar file is created, reference it along with the wsc jar file (for example, wsc-22.jar) in your Java program to create a client application.

In your case the error is indicating that it can't find your partner.wsdl file. Is it in the current directory that you are running the command from? You should have downloaded from your developer edition org in a prior step from under Setup > Develop > API.

If is isn't in the current directory, you may need to add the full path for it in the command.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .